-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathwebpack.example.config.js
41 lines (40 loc) · 1.12 KB
/
webpack.example.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
const ExtractTextPlugin = require('extract-text-webpack-plugin');
const HtmlWebpackPlugin = require('html-webpack-plugin');
var config = {
entry: './example/index',
output: {
filename: '[name].js',
publicPath: '/'
},
module: {
rules: [{
test: /\.vue$/,
loader: 'vue-loader',
options: {
loaders: {
// Refer to: https://github.com/vuejs/vue-loader/blob/master/docs/en/configurations/extract-css.md#webpack-2x-210-beta25
css: ExtractTextPlugin.extract({
loader: 'css-loader',
fallback: 'vue-style-loader'
})
}
}
},{
test: /\.js$/,
exclude: /node_modules/,
loader: 'babel-loader',
}]
},
plugins: [
new HtmlWebpackPlugin({
template: './example/index.html'
}),
new ExtractTextPlugin('vue-paginator-simple.css')
],
resolve: {
alias: {
'vue': 'vue/dist/vue.js'
}
},
};
module.exports = config;