forked from steemit/condenser
-
Notifications
You must be signed in to change notification settings - Fork 0
/
prod.config.js
39 lines (38 loc) · 1.09 KB
/
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
const webpack = require('webpack');
const git = require('git-rev-sync');
const baseConfig = require('./base.config');
module.exports = {
...baseConfig,
plugins: [
new webpack.DefinePlugin({
'process.env': {
BROWSER: JSON.stringify(true),
NODE_ENV: JSON.stringify('production'),
VERSION: JSON.stringify(git.long())
}
}),
new webpack.optimize.UglifyJsPlugin({
compress: {
warnings: false,
screw_ie8: true,
sequences: true,
dead_code: true,
drop_debugger: true,
comparisons: true,
conditionals: true,
evaluate: true,
booleans: true,
loops: true,
unused: true,
hoist_funs: true,
if_return: true,
join_vars: true,
cascade: true
},
output: {
comments: false
}
}),
...baseConfig.plugins
]
};