@@ -11,10 +11,10 @@ import { IJSCodeshift, INode } from "../types/NodePath";
1111/**
1212 *
1313 * Transform which:
14- * Removes UglifyWebpackPlugin from plugins array, if no options is passed to the plugin.
14+ * Removes TerserWebpackPlugin from plugins array, if no options is passed to the plugin.
1515 * and adds `optimization.minimize: true` to config
1616 *
17- * If any configuration is passed to UglifyWebpackPlugin
17+ * If any configuration is passed to TerserWebpackPlugin
1818 * plugin instantiation is moved to `optimization.minimizer`.
1919 *
2020 * @param {Object } j - jscodeshift top-level import
@@ -54,7 +54,7 @@ export default function(j: IJSCodeshift, ast: INode): INode {
5454 const pluginOptions : INode [ ] = node . value . arguments ;
5555
5656 /**
57- * check if there are any options passed to UglifyWebpackPlugin
57+ * check if there are any options passed to TerserWebpackPlugin
5858 * If so, they are moved to optimization.minimizer.
5959 * Otherwise, rely on default options
6060 */
@@ -63,11 +63,11 @@ export default function(j: IJSCodeshift, ast: INode): INode {
6363 * If user is using TerserPlugin directly from webpack
6464 * transformation must:
6565 * - remove it
66- * - add require for uglify -webpack-plugin
66+ * - add require for terser -webpack-plugin
6767 * - add to minimizer
6868 */
6969 if ( pluginVariableAssignment && pluginVariableAssignment . includes ( "webpack" ) ) {
70- // create require for uglify -webpack-plugin
70+ // create require for terser -webpack-plugin
7171 const pathRequire : INode = getRequire (
7272 j ,
7373 "TerserPlugin" ,
@@ -118,7 +118,7 @@ export default function(j: IJSCodeshift, ast: INode): INode {
118118 ) ;
119119 }
120120
121- // remove the old Uglify plugin from Plugins array.
121+ // remove the old Terser plugin from Plugins array.
122122 j ( node ) . remove ( ) ;
123123 } ) ;
124124
0 commit comments