forked from planttheidea/remeasure
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.minified.js
43 lines (37 loc) · 968 Bytes
/
webpack.config.minified.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
'use strict';
const webpack = require('webpack');
const OptimizeJsPlugin = require('optimize-js-plugin');
const defaultConfig = require('./webpack.config');
module.exports = Object.assign({}, defaultConfig, {
cache: false,
devtool: undefined,
output: Object.assign({}, defaultConfig.output, {
filename: 'remeasure.min.js'
}),
plugins: defaultConfig.plugins.concat([
new webpack.LoaderOptionsPlugin({
debug: false,
minimize: true
}),
new webpack.optimize.OccurrenceOrderPlugin(),
new webpack.optimize.UglifyJsPlugin({
compress: {
booleans: true,
conditionals: true,
dead_code: true,
drop_console: true,
drop_debugger: true,
evaluate: true,
join_vars: true,
screw_ie8: true,
sequences: true,
unused: true,
warnings: false
},
sourceMap: false
}),
new OptimizeJsPlugin({
sourceMap: false
})
])
});