File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change 11const path = require ( 'path' ) ;
2-
2+ const webpack = require ( 'webpack' )
33
44module . exports = function ( env ) {
55 env = env || { } ;
6-
6+ let plugins = [ ] ;
77
88 /**
99 * If -p flag is set, minify the files
@@ -12,6 +12,16 @@ module.exports = function (env) {
1212 const src = ! env . p ;
1313 const filenamePostfix = src ? '.src' : '' ;
1414
15+ if ( ! src ) {
16+ plugins . push ( new webpack . optimize . UglifyJsPlugin ( {
17+ compress : {
18+ drop_console : true ,
19+ unsafe : true
20+ }
21+ } )
22+ )
23+ }
24+
1525 /**
1626 * If -b flag is set, build bundles, and not exclude highcharts from the build
1727 * @type {boolean }
@@ -86,6 +96,7 @@ module.exports = function (env) {
8696 }
8797 ]
8898 } ,
99+ plugins : plugins ,
89100 externals : externals ,
90101 resolve : {
91102 modules : [
You can’t perform that action at this time.
0 commit comments