Skip to content

build(plugins): enable advanced ESM#6514

Merged
chenjiahan merged 3 commits intomainfrom
plugins_esm_1106
Nov 6, 2025
Merged

build(plugins): enable advanced ESM#6514
chenjiahan merged 3 commits intomainfrom
plugins_esm_1106

Conversation

@chenjiahan
Copy link
Member

Summary

Enable Rslib's advanced ESM features for all plugin packages.

Before

@rsbuild/webpack:

File (esm)      Size
dist/0~502.js   10.9 kB
dist/index.js   15.7 kB
dist/0~0.js     73.9 kB

       Total:   100.4 kB

After

@rsbuild/webpack:

File (esm)              Size
dist/rslib-runtime.js   1.3 kB
dist/index.js           12.4 kB
dist/0~24.js            82.8 kB

               Total:   96.6 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:42
@netlify
Copy link

netlify bot commented Nov 6, 2025

Deploy Preview for rsbuild ready!

Name Link
🔨 Latest commit fb38b90
🔍 Latest deploy log https://app.netlify.com/projects/rsbuild/deploys/690c1cf260310b0007c11d29
😎 Deploy Preview https://deploy-preview-6514--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 (🟢 up 18 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 ESM format configurations across multiple packages in the monorepo. The feature is enabled for all ESM-based builds to take advantage of advanced ESM handling capabilities.

  • Enabled experiments.advancedEsm: true for ESM configurations
  • Updated the shared base configuration in scripts/config/rslib.config.ts
  • Applied the setting to individual packages that define custom ESM configurations

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
scripts/config/rslib.config.ts Adds advancedEsm experiment to the base esmConfig used across packages
packages/plugin-svgr/rslib.config.ts Enables advancedEsm for the custom ESM loader configuration
packages/create-rsbuild/rslib.config.ts Adds advancedEsm experiment to the standalone ESM build configuration
packages/compat/plugin-webpack-swc/rslib.config.ts Enables advancedEsm for the custom ESM loader configuration

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

@chenjiahan chenjiahan merged commit 5b2c2d7 into main Nov 6, 2025
11 checks passed
@chenjiahan chenjiahan deleted the plugins_esm_1106 branch November 6, 2025 04:42
@chenjiahan chenjiahan mentioned this pull request 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