Skip to content

feat!: enable advanced esm by default#1413

Merged
Timeless0911 merged 4 commits intomainfrom
adv-esm-default
Dec 29, 2025
Merged

feat!: enable advanced esm by default#1413
Timeless0911 merged 4 commits intomainfrom
adv-esm-default

Conversation

@Timeless0911
Copy link
Copy Markdown
Contributor

@Timeless0911 Timeless0911 commented Dec 26, 2025

Summary

In previous versions, Rslib integrated Rspack's EsmLibraryPlugin through an experimental configuration of experiments.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

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

Copilot AI review requested due to automatic review settings December 26, 2025 10:09
@netlify
Copy link
Copy Markdown

netlify bot commented Dec 26, 2025

Deploy Preview for rslib ready!

Name Link
🔨 Latest commit 0335caf
🔍 Latest deploy log https://app.netlify.com/projects/rslib/deploys/6951fa90a013620008b346d8
😎 Deploy Preview https://deploy-preview-1413--rslib.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 false to true in 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
fi3ework previously approved these changes Dec 29, 2025
@Timeless0911 Timeless0911 enabled auto-merge (squash) December 29, 2025 04:00
@Timeless0911 Timeless0911 merged commit d164c94 into main Dec 29, 2025
16 checks passed
@Timeless0911 Timeless0911 deleted the adv-esm-default branch December 29, 2025 04:14
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