Use uglifyjs-webpack-plugin instead of uglify-es-webpack-plugin
Because uglify-es-webpack-plugin is now deprecated
This commit is contained in:
parent
b5f724381e
commit
866d5428bc
3 changed files with 9 additions and 11 deletions
|
@ -2,13 +2,11 @@ const StringReplacePlugin = require('string-replace-webpack-plugin');
|
|||
|
||||
import constant from './const';
|
||||
import hoist from './hoist';
|
||||
//import minify from './minify';
|
||||
import minify from './minify';
|
||||
import banner from './banner';
|
||||
|
||||
/*
|
||||
const env = process.env.NODE_ENV;
|
||||
const isProduction = env === 'production';
|
||||
*/
|
||||
|
||||
export default version => {
|
||||
const plugins = [
|
||||
|
@ -16,11 +14,11 @@ export default version => {
|
|||
new StringReplacePlugin(),
|
||||
hoist()
|
||||
];
|
||||
/*
|
||||
|
||||
if (isProduction) {
|
||||
plugins.push(minify());
|
||||
}
|
||||
*/
|
||||
|
||||
plugins.push(banner(version));
|
||||
|
||||
return plugins;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue