Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

perf: enable compress minify option for node target #424

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

chenjiahan
Copy link
Member

Summary

For the Node target, keep output bundles as small as possible while retaining the necessary information for debugging, as Node outputs usually executed directly at runtime rather than being built again.

See web-infra-dev/rsbuild#3966 for more.

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

@chenjiahan chenjiahan marked this pull request as draft November 14, 2024 06:19
@chenjiahan
Copy link
Member Author

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.

@Timeless0911
Copy link
Collaborator

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.

Do we need to encapsulate a configuration, or we can just document how to configure it if a smaller bundle is needed?

@chenjiahan
Copy link
Member Author

I think adding documentation is good enough for this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants