Skip to content

Commit f9cb8ce

Browse files
abenezerabebesendilkumarn
authored andcommittedMar 16, 2019
chore: replace instances of uglify with terser
1 parent b1cf4cc commit f9cb8ce

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed
 

‎packages/generators/init-generator.ts

+3-3
Original file line numberDiff line numberDiff 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(
437437
tooltip.uglify(),
438-
"const UglifyJSPlugin = require('uglifyjs-webpack-plugin');",
438+
"const TerserPlugin = require('terser-webpack-plugin');",
439439
"\n",
440440
);
441441
}

‎packages/generators/utils/plugins.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
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 terser-webpack-plugin
77
*/
88

99
export default function(_?: void): string[] {
10-
return ["new UglifyJSPlugin()"];
10+
return ["new TerserPlugin()"];
1111
}

0 commit comments

Comments
 (0)