diff --git a/webpack.prod.mjs b/webpack.prod.mjs index 5b6813c..76a436d 100644 --- a/webpack.prod.mjs +++ b/webpack.prod.mjs @@ -72,19 +72,21 @@ export default (args = {}) => }), ] : [ new TerserPlugin({ + minify: TerserPlugin.swcMinify, extractComments: { condition: true, banner: false, }, terserOptions: { - sourceMap: true, ecma: 5, mangle: { - properties: { - regex: /^__(?!default$)/, + // swc regex has no lookahead, so '__default' is kept through reserved list + props: { + regex: '^__', + reserved: ['__default'], }, }, - output: { comments: false }, + format: { comments: false }, }, }), ];