Closed mavridiSS closed 7 months ago
That is exactly as expected! Terser is slower but has smaller output. You can tweak some SWC options but the result can be disappointing. SWC's main focus is speed. (same as esbuild) Here is nothing we can do in this plugin. You can checkout some discussions from SWC's repo.
If I replace the
minimizer
in below config withnew SwcMinifyWebpackPlugin({sourceMap: false})
the bundle size increases(17.2MB -> 18.2MB). Any idea why and how can I improve it as I want to leverage the speed ofSwcMinifyWebpackPlugin