-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebpack.config.js
More file actions
61 lines (60 loc) · 1.47 KB
/
webpack.config.js
File metadata and controls
61 lines (60 loc) · 1.47 KB
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
const webpack = require('webpack');
module.exports = {
entry: {
app: ['./app/index.js', 'webpack/hot/dev-server', 'webpack-dev-server/client?http://localhost:8080/'],
},
output: {
path: __dirname + '/target/bundle',
publicPath: '/bundle/',
filename: 'main.js',
},
module: {
loaders: [{
test: /\.js$/,
loader: 'babel',
exclude: /node_modules/
}, {
test: /\.vue$/,
loader: 'vue',
}, {
test: /\.scss$/,
loader: 'vue-style-loader!css-loader!sass-loader',
}, {
test: /\.(eot|svg|ttf|woff|woff2)$/,
loader: 'file'
}, {
test: /\.json$/,
loader: 'json-loader'
}, {
test: /\.(jpe?g|png|gif|svg)$/i,
loader: 'url?limit=10000!img?progressive=true'
}]
},
resolve: {
alias: {
'vue$': 'vue/dist/vue.common.js'
}
},
plugins: [
new webpack.HotModuleReplacementPlugin(),
],
vue: {
loaders: {
js: 'babel',
scss: 'vue-style-loader!css-loader!sass-loader', // <style lang="scss">
},
},
devServer: {
stats: {
colors: true,
},
publicPath: '/bundle/',
contentBase: 'target/',
hot: true,
stats: {
version: false,
colors: true,
chunks: true,
},
},
}