-
Notifications
You must be signed in to change notification settings - Fork 12
/
webpack.config.min.js
65 lines (65 loc) · 2.14 KB
/
webpack.config.min.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
63
64
65
/**
* Created by Jacky.gao on 2016/5/17.
*/
var webpack = require('webpack');
var WebpackCleanupPlugin = require('webpack-cleanup-plugin');
module.exports = {
entry: {
frame:'./src/frame/index.jsx',
variableEditor:'./src/variable/index.jsx',
constantEditor:'./src/constant/index.jsx',
parameterEditor:'./src/parameter/index.jsx',
actionEditor:'./src/action/index.jsx',
packageEditor:'./src/package/index.jsx',
flowDesigner:'./src/flow/index.jsx',
ruleSetEditor:'./src/editor/urule/index.jsx',
decisionTableEditor:'./src/editor/decisiontable/index.jsx',
scriptDecisionTableEditor:'./src/editor/scriptdecisiontable/index.jsx',
decisionTreeEditor:'./src/editor/decisiontree/index.jsx',
clientConfigEditor:'./src/client/index.jsx',
ulEditor:'./src/editor/ul/index.jsx',
scoreCardTable:'./src/scorecard/index.jsx',
permissionConfigEditor:'./src/permission/index.jsx'
},
output: {
path: '../urule-console/src/main/resources/asserts/js',
filename: '[name].bundle.js'
},
plugins: [
new webpack.optimize.UglifyJsPlugin({
compress: {
warnings: false
},
output: {
comments: false
}
}),
new webpack.DefinePlugin({
'process.env':{
'NODE_ENV': JSON.stringify('production')
}
}),
new WebpackCleanupPlugin()
],
module: {
loaders: [
{
test: /\.(jsx|js)?$/,
exclude: /(node_modules|bower_components)/,
loader: 'babel',
query: {
presets: ['react', 'es2015'],
compact:true
}
},
{
test: /\.css$/,
loader: "style-loader!css-loader"
},
{
test: /\.(eot|woff|woff2|ttf|svg|png|jpg)$/,
loader: 'url-loader?limit=1000000&name=[name]-[hash].[ext]'
}
]
}
}