Skip to content

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
Contributor

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.

3 participants