web-infra-dev / rslib

Create JavaScript libraries in a simple and intuitive way.
https://lib.rsbuild.dev/
MIT License
477 stars 26 forks source link

[Docs] how to enable compress minify option for node target #444

Open Timeless0911 opened 1 week ago

Timeless0911 commented 1 week ago
          I found that this optimization breaks a lot of test snapshots, some of the changes are unexpected. For example, the code readability may be significantly worse.

I'm now tending to make this optimization opt-in. If users want a smaller Node.js bundle, they can manually set the minify configuration.

Originally posted by @chenjiahan in https://github.com/web-infra-dev/rslib/issues/424#issuecomment-2477910146

Timeless0911 commented 1 week ago

I think we can add a doc about bundle size to explain some behavior of compress / mangle / preserve comments.