forked from MrHuxu/easy-interview
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebpack.config.js
More file actions
31 lines (27 loc) · 963 Bytes
/
webpack.config.js
File metadata and controls
31 lines (27 loc) · 963 Bytes
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
var path = require('path');
var webpack = require('webpack');
module.exports = {
entry: {
app: ['webpack/hot/dev-server', './client/javascripts/index.js']
},
output: {
path: path.join(__dirname, 'server', 'public', 'built'),
filename: 'bundle.js',
publicPath: '/assets/'
},
module: {
loaders: [
{ test: /\.js$/, loader: 'babel-loader' },
{ test: /\.css$/, loader: 'style-loader!css-loader' },
{ test: /\.woff(2)?(\?v=[0-9]\.[0-9]\.[0-9])?$/, loader: "url-loader?limit=10000&minetype=application/font-woff" },
{ test: /\.(ttf|eot|svg)(\?v=[0-9]\.[0-9]\.[0-9])?$/, loader: "file-loader" },
{ test: /\.(jpe?g|png|gif|svg)$/i, loader: 'url?limit=10000!img?progressive=true' }
]
},
plugins: [
new webpack.optimize.UglifyJsPlugin({minimize: true}),
new webpack.HotModuleReplacementPlugin(),
new webpack.optimize.OccurenceOrderPlugin(),
new webpack.optimize.DedupePlugin()
]
}