Skip to content

build(core): enable advanced ESM#6513

Merged
chenjiahan merged 1 commit intomainfrom
advanced_esm_1106
Nov 6, 2025
Merged

build(core): enable advanced ESM#6513
chenjiahan merged 1 commit intomainfrom
advanced_esm_1106

Conversation

@chenjiahan
Copy link
Member

Summary

Enable Rslib's advanced ESM features for all ESM builds of @rsbuild/core.

Before

File (esm_index)         Size
dist/0~range-parser.js   2.4 kB
dist/0~open.js           18.3 kB
dist/index.js            495.2 kB

                Total:   515.9 kB


File (esm_loaders)            Size
dist/ignoreCssLoader.mjs      0.19 kB
dist/transformLoader.mjs      2.1 kB
dist/transformRawLoader.mjs   2.1 kB

                     Total:   4.5 kB

After

File (esm_index)         Size
dist/0~range-parser.js   2.3 kB
dist/rslib-runtime.js    2.3 kB
dist/0~open.js           14.9 kB
dist/index.js            489.7 kB

                Total:   509.2 kB


File (esm_loaders)            Size
dist/ignoreCssLoader.mjs      0.13 kB
dist/223.mjs                  0.55 kB
dist/transformLoader.mjs      1.6 kB
dist/transformRawLoader.mjs   1.7 kB

                     Total:   4.0 kB

Related Links

Checklist

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

Copilot AI review requested due to automatic review settings November 6, 2025 03:35
@netlify
Copy link

netlify bot commented Nov 6, 2025

Deploy Preview for rsbuild ready!

Name Link
🔨 Latest commit 34b646d
🔍 Latest deploy log https://app.netlify.com/projects/rsbuild/deploys/690c1797ba7b5000089abcf9
😎 Deploy Preview https://deploy-preview-6513--rsbuild.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 72 (🔴 down 3 from production)
Accessibility: 97 (no change from production)
Best Practices: 100 (no change from production)
SEO: 100 (no change from production)
PWA: 60 (no change from production)
View the detailed breakdown and full score reports

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

Copy link
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 enables the advancedEsm experimental feature for all ESM format builds in the core package. This configuration is applied to improve ESM output handling.

  • Adds experiments.advancedEsm: true to all ESM format library configurations
  • Ensures consistent configuration across esm_index, esm_loaders, and esm_client builds
  • Leaves CJS builds unchanged as the feature is ESM-specific

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@chenjiahan chenjiahan merged commit c3b10d4 into main Nov 6, 2025
18 checks passed
@chenjiahan chenjiahan deleted the advanced_esm_1106 branch November 6, 2025 03:46
chenjiahan added a commit that referenced this pull request Nov 7, 2025
This was referenced Nov 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments