aboutsummaryrefslogtreecommitdiff
path: root/webpack.config.js
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2022-12-08 11:33:42 +0300
committerGravatar Vitaly Takmazov2022-12-08 11:35:03 +0300
commitc942dcfcb854d0c3411ea29c3f9b7cba29314371 (patch)
treed6fb6e3a83af1f929c9d67e51f53dbe639d37684 /webpack.config.js
parentd4beb3a3cc2928a33a89bce6be1b084a65998bbd (diff)
webpack: minify using `swc`
Diffstat (limited to 'webpack.config.js')
-rw-r--r--webpack.config.js13
1 files changed, 3 insertions, 10 deletions
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: {},
}),
]