File tree Expand file tree Collapse file tree 3 files changed +9
-9
lines changed Expand file tree Collapse file tree 3 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ export default class InitGenerator extends Generator {
4343 this . dependencies = [
4444 "webpack" ,
4545 "webpack-cli" ,
46- "uglifyjs -webpack-plugin" ,
46+ "terser -webpack-plugin" ,
4747 "babel-plugin-syntax-dynamic-import" ,
4848 ] ;
4949 this . configuration = {
@@ -430,12 +430,12 @@ export default class InitGenerator extends Generator {
430430 public installPlugins ( ) {
431431 if ( this . isProd ) {
432432 this . dependencies = this . dependencies . filter (
433- ( p : string ) => p !== "uglifyjs -webpack-plugin" ,
433+ ( p : string ) => p !== "terser -webpack-plugin" ,
434434 ) ;
435435 } else {
436436 this . configuration . config . topScope . push (
437- tooltip . uglify ( ) ,
438- "const UglifyJSPlugin = require('uglifyjs -webpack-plugin');" ,
437+ tooltip . terser ( ) ,
438+ "const TerserPlugin = require('terser -webpack-plugin');" ,
439439 "\n" ,
440440 ) ;
441441 }
Original file line number Diff line number Diff line change 33 * Callable function with the initial plugins
44 *
55 * @returns {Function } An function that returns an array
6- * that consists of the uglify plugin
6+ * that consists of the terser plugin
77 */
88
99export default function ( _ ?: void ) : string [ ] {
10- return [ "new UglifyJSPlugin ()" ] ;
10+ return [ "new TerserPlugin ()" ] ;
1111}
Original file line number Diff line number Diff line change @@ -50,12 +50,12 @@ export default {
5050 */` ;
5151 } ,
5252
53- uglify : ( _ ?: void ) : string => {
53+ terser : ( _ ?: void ) : string => {
5454 return `/*
55- * We've enabled UglifyJSPlugin for you! This minifies your app
55+ * We've enabled TerserJSPlugin for you! This minifies your app
5656 * in order to load faster and run less javascript.
5757 *
58- * https://github.com/webpack-contrib/uglifyjs -webpack-plugin
58+ * https://github.com/webpack-contrib/terser -webpack-plugin
5959 *
6060 */` ;
6161 } ,
You can’t perform that action at this time.
0 commit comments