-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
62 lines (61 loc) · 1.19 KB
/
webpack.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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
var path = require('path');
var ExtractTextPlugin = require('extract-text-webpack-plugin');
module.exports = {
entry: {
index: './client/index/index.js',
404: './client/404/404.js',
math: './client/math/math.js'
},
output: {
path: path.resolve(__dirname, 'dist'),
publicPath: '/static/',
filename: '[name].bundle.js'
},
module: {
loaders: [{
test: /\.vue$/,
loader: 'vue-loader'
}, {
test: /\.js$/,
loader: 'babel-loader'
}, {
test: /.css$/,
loader: ExtractTextPlugin.extract('style-loader', 'css-loader')
}, {
test: /.(ttf|otf|eot|svg|woff(2)?)(\?[a-z0-9]+)?$/,
use: [{
loader: 'file-loader',
options: {
name: '[name].[ext]',
outputPath: 'fonts',
publicPath: 'fonts'
}
}]
}]
},
resolve: {
modules: [
path.resolve('./client'),
path.resolve('./node_modules')
],
alias: {
'vue$': 'vue/dist/vue.esm.js'
}
},
devServer: {
hot: true,
historyApiFallback: false,
compress: true,
quiet: false,
port: 3001,
stats: { colors: true },
proxy: {
"**":"http://localhost:3000"
}
},
plugins: [
new ExtractTextPlugin('[name].css', {
allChunks: true
})
]
};