feat!: enable advanced esm by default#1413
Merged
Timeless0911 merged 4 commits intomainfrom Dec 29, 2025
Merged
Conversation
✅ Deploy Preview for rslib ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
96e0a53 to
a4d85f1
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This PR changes the default value of experiments.advancedEsm from false to true, making the experimental ESM output feature enabled by default for bundled ESM format libraries.
- Updated default value from
falsetotruein implementation and documentation - Modified documentation examples to show how to disable the feature instead of enable it
- Simplified example configurations that were explicitly enabling this feature since it's now the default
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| website/docs/zh/config/lib/experiments.mdx | Updated Chinese documentation to reflect new default value and changed example to show disabling the feature |
| website/docs/en/config/lib/experiments.mdx | Updated English documentation to reflect new default value and changed example to show disabling the feature |
| packages/core/tests/config.test.ts | Renamed test from "Enable" to "Disable" and changed test value from true to false to test non-default behavior |
| packages/core/tests/snapshots/config.test.ts.snap | Updated snapshots to reflect new default behavior with advanced ESM enabled |
| packages/core/src/types/config.ts | Updated JSDoc comment to reflect new default value of true |
| packages/core/src/config.ts | Changed implementation to default advancedEsm to true and updated related logic |
| examples/vue-component-bundle/rslib.config.ts | Removed explicit advancedEsm: true configuration since it's now the default |
| examples/solid-component-bundle/rslib.config.ts | Removed explicit advancedEsm: true configuration since it's now the default |
| examples/react-component-bundle/rslib.config.ts | Removed explicit advancedEsm: true configuration since it's now the default |
| examples/module-federation/mf-react-component/rslib.config.ts | Removed explicit advancedEsm: true configuration since it's now the default |
| examples/express-plugin/rslib.config.ts | Removed explicit advancedEsm: true configuration since it's now the default |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
fi3ework
reviewed
Dec 29, 2025
e9a6358 to
1573e76
Compare
fi3ework
previously approved these changes
Dec 29, 2025
1573e76 to
0335caf
Compare
fi3ework
approved these changes
Dec 29, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
In previous versions, Rslib integrated Rspack's
EsmLibraryPluginthrough an experimental configuration ofexperiments.advancedEsm, aiming to optimize the quality of ESM output. Now, we are pleased to announce that this plugin has been stabilized.In this PR, this plugin is enabled by default in bundle mode. Developers can directly obtain high-quality ESM output that are more friendly to static analysis and fully support code splitting without any additional configuration.
Related Links
Checklist