forked from frenchtoast747/webgl-obj-loader
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.prod.js
37 lines (35 loc) · 1022 Bytes
/
webpack.prod.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
const merge = require('webpack-merge');
const common = require('./webpack.common');
const webpack = require('webpack');
module.exports = merge(common, {
output: {
filename: 'webgl-obj-loader.min.js',
sourceMapFilename: 'webgl-obj-loader.min.js.map'
},
plugins: [
new webpack.optimize.DedupePlugin(),
new webpack.optimize.AggressiveMergingPlugin(),
new webpack.DefinePlugin({
'process.env.NODE_ENV': JSON.stringify('production')
}),
new webpack.optimize.UglifyJsPlugin({
sourceMap: false,
compress: {
sequences: true,
dead_code: true,
conditionals: true,
booleans: true,
unused: true,
if_return: true,
join_vars: true,
drop_console: true
},
mangle: {
except: ['$super', '$', 'exports', 'require']
},
output: {
comments: false
}
})
]
});