If you are using webpack v5 or above you do not need to install this plugin. Webpack v5 comes with the latest terser-webpack-plugin out of the box.
I am going to use webpack v5, so per doc, I removed terser: npm uninstall terser-webpack-plugin. But I am not sure how to migrate the following settings which were set for webpack v4 + TerserPlugin:
optimization: {
minimizer: [
new TerserPlugin({
sourceMap: true,
terserOptions: {
output: {
comments: /^!/,
},
},
extractComments: false,
}),
],
},
I Could not find the document online. Can anyone help, please?