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 {
43
43
this . dependencies = [
44
44
"webpack" ,
45
45
"webpack-cli" ,
46
- "uglifyjs -webpack-plugin" ,
46
+ "terser -webpack-plugin" ,
47
47
"babel-plugin-syntax-dynamic-import" ,
48
48
] ;
49
49
this . configuration = {
@@ -430,12 +430,12 @@ export default class InitGenerator extends Generator {
430
430
public installPlugins ( ) {
431
431
if ( this . isProd ) {
432
432
this . dependencies = this . dependencies . filter (
433
- ( p : string ) => p !== "uglifyjs -webpack-plugin" ,
433
+ ( p : string ) => p !== "terser -webpack-plugin" ,
434
434
) ;
435
435
} else {
436
436
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');" ,
439
439
"\n" ,
440
440
) ;
441
441
}
Original file line number Diff line number Diff line change 3
3
* Callable function with the initial plugins
4
4
*
5
5
* @returns {Function } An function that returns an array
6
- * that consists of the uglify plugin
6
+ * that consists of the terser plugin
7
7
*/
8
8
9
9
export default function ( _ ?: void ) : string [ ] {
10
- return [ "new UglifyJSPlugin ()" ] ;
10
+ return [ "new TerserPlugin ()" ] ;
11
11
}
Original file line number Diff line number Diff line change @@ -50,12 +50,12 @@ export default {
50
50
*/` ;
51
51
} ,
52
52
53
- uglify : ( _ ?: void ) : string => {
53
+ terser : ( _ ?: void ) : string => {
54
54
return `/*
55
- * We've enabled UglifyJSPlugin for you! This minifies your app
55
+ * We've enabled TerserJSPlugin for you! This minifies your app
56
56
* in order to load faster and run less javascript.
57
57
*
58
- * https://github.com/webpack-contrib/uglifyjs -webpack-plugin
58
+ * https://github.com/webpack-contrib/terser -webpack-plugin
59
59
*
60
60
*/` ;
61
61
} ,
You can’t perform that action at this time.
0 commit comments