-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.prod.config.js
45 lines (44 loc) · 1.06 KB
/
webpack.prod.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
var webpack = require('webpack');
var commonsPlugin = new webpack.optimize.CommonsChunkPlugin('common.js');
var path = require('path');
module.exports = {
entry: {
'webcb': [
"./src/apps/home/webcb.js"
],
'webcb-user': [
"./src/apps/user/webcb-user.js"
],
'webcb-shop': [
"./src/apps/shop/webcb-shop.js"
],
},
output: {
path: __dirname + "/",
filename: '[name].js'
},
resolve: {
extensions: ['', '.js', '.css']
},
module: {
loaders: [{
test: /\.js$/,
loaders: ["babel"],
exclude: /node_modules|tools/,
include: [path.join(__dirname, 'src')]
}, {
test: /\.less$/,
loader: "style!css!less"
}, {
test: /\.(jpg|png)$/, loader: "url-loader?limit=8192"
}]
},
plugins: [
commonsPlugin,
new webpack.optimize.UglifyJsPlugin({
compress: {
warnings: false
}
})
]
};