#Change minifier in Angular build

1 messages · Page 1 of 1 (latest)

left glen
#

is there way to change minifier in Angular build? like for example i want to use swc as minifier

scarlet zinc
#

I don't think you can, but therotically you could run an second minifier on top of the the current one.

#

What are you expecting by using swc ?

#

Are you using the webpack or the application builder ?

left glen
#

yes im using the application build, im running build production
if im running build production i assume it will minify the result?
swc has good and smaller bundler size base on this benchmark https://github.com/privatenumber/minification-benchmarks
as far as i know under the hood angular uses terser as there minifier.

GitHub

🏃‍♂️🏃‍♀️🏃 JS minification benchmarks: babel-minify, esbuild, terser, uglify-js, swc, google closure compiler, tdewolff/minify - privatenumber/minification-benchmarks

scarlet zinc
#

I don't think the application builder uses terser. Iirc, only the webpack builder used terser.

#

the Application builder is based on esbuild and uses it as minifier.