developit / microbundle

📦 Zero-configuration bundler for tiny modules.
https://npm.im/microbundle
MIT License
8.04k stars 362 forks source link

how to config compress options #918

Closed bluelovers closed 2 years ago

bluelovers commented 2 years ago

how to config compress options, if i want

developit commented 2 years ago

@bluelovers add a mangle.json file and define minify.compress using any of the available compress options from Terser. Here's an example from Preact:

https://github.com/preactjs/preact/blob/2af05f533ca7a11afcf08d8914df261e2fbec52e/mangle.json#L20-L23