From c942dcfcb854d0c3411ea29c3f9b7cba29314371 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Thu, 8 Dec 2022 11:33:42 +0300 Subject: webpack: minify using `swc` --- webpack.config.js | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) (limited to 'webpack.config.js') diff --git a/webpack.config.js b/webpack.config.js index a2da5786..cd77fb53 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -55,16 +55,9 @@ module.exports = (env, argv) => { minimize: !dev, minimizer: [ new TerserPlugin({ - minify: TerserPlugin.esbuildMinify, - // `terserOptions` options will be passed to `esbuild` - // Link to options - https://esbuild.github.io/api/#minify - // Note: the `minify` options is true by default (and override other `minify*` options), so if you want to disable the `minifyIdentifiers` option (or other `minify*` options) please use: - // terserOptions: { - // minify: false, - // minifyWhitespace: true, - // minifyIdentifiers: false, - // minifySyntax: true, - // }, + minify: TerserPlugin.swcMinify, + // `terserOptions` options will be passed to `swc` (`@swc/core`) + // Link to options - https://swc.rs/docs/config-js-minify terserOptions: {}, }), ] -- cgit v1.2.3