Fix
This commit is contained in:
parent
ceebb84272
commit
5620ae7384
|
@ -87,6 +87,7 @@
|
|||
"tslint": "5.3.2",
|
||||
"uglify-es": "3.0.11",
|
||||
"uglify-js": "git+https://github.com/mishoo/UglifyJS2.git#harmony",
|
||||
"uglifyjs-webpack-plugin": "0.4.3",
|
||||
"webpack": "2.6.0"
|
||||
},
|
||||
"dependencies": {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import * as webpack from 'webpack';
|
||||
const StringReplacePlugin = require('string-replace-webpack-plugin');
|
||||
|
||||
import constant from './const';
|
||||
import minify from './minify';
|
||||
|
||||
const env = process.env.NODE_ENV;
|
||||
const isProduction = env === 'production';
|
||||
|
@ -13,7 +13,7 @@ export default () => {
|
|||
];
|
||||
|
||||
if (isProduction) {
|
||||
plugins.push(new webpack.optimize.UglifyJsPlugin());
|
||||
plugins.push(minify());
|
||||
}
|
||||
|
||||
return plugins;
|
||||
|
|
3
webpack/plugins/minify.ts
Normal file
3
webpack/plugins/minify.ts
Normal file
|
@ -0,0 +1,3 @@
|
|||
const UglifyJSPlugin = require('uglifyjs-webpack-plugin');
|
||||
|
||||
export default () => new UglifyJSPlugin();
|
Loading…
Reference in a new issue