feat!: remove experiments.outputModule config#12912
Conversation
Rsdoctor Bundle Diff AnalysisFound 5 projects in monorepo, 5 projects with changes. 📊 Quick Summary
📋 Detailed Reports (Click to expand)📁 react-10kPath:
📦 Download Diff Report: react-10k Bundle Diff 📁 react-1kPath:
📦 Download Diff Report: react-1k Bundle Diff 📁 react-5kPath:
📦 Download Diff Report: react-5k Bundle Diff 📁 romePath:
📦 Download Diff Report: rome Bundle Diff 📁 ui-componentsPath:
📦 Download Diff Report: ui-components Bundle Diff Generated by Rsdoctor GitHub Action |
📦 Binary Size-limit
🙈 Size remains the same at 48.33MB |
CodSpeed Performance ReportMerging this PR will not alter performanceComparing Summary
Footnotes
|
tests/rspack-test/configCases/target/universal/rspack.config.js
Outdated
Show resolved
Hide resolved
.../rspack-test/serialCases/container-1-5/4-async-startup-runtime-chunk-single/rspack.config.js
Outdated
Show resolved
Hide resolved
Deploying rspack with
|
| Latest commit: |
2747fab
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://84db3d05.rspack-v2.pages.dev |
| Branch Preview URL: | https://refactor-remove-experiments.rspack-v2.pages.dev |
There was a problem hiding this comment.
Pull request overview
This pull request refactors the configuration for ESM module output by removing the experimental experiments.outputModule flag and promoting output.module as the standard configuration option.
Changes:
- Removed
experiments.outputModulefrom type definitions, normalization logic, and default configuration - Updated all test configurations to use
output.moduleinstead ofexperiments.outputModule - Modified defaults logic to automatically set
output.moduletotruewhenlibrary.typeis 'module' or 'modern-module' - Updated documentation in both English and Chinese to reflect the new configuration approach
Reviewed changes
Copilot reviewed 161 out of 161 changed files in this pull request and generated 17 comments.
Show a summary per file
| File | Description |
|---|---|
| website/docs/zh/guide/features/esm.mdx | Removed outdated reference to experiments.outputModule in Chinese documentation |
| website/docs/zh/config/output.mdx | Updated Chinese documentation but contains outdated code examples |
| website/docs/zh/config/externals.mdx | Updated Chinese documentation to reference output.module |
| website/docs/zh/config/experiments.mdx | Removed experiments.outputModule section from Chinese documentation |
| website/docs/en/guide/features/esm.mdx | Removed outdated reference to experiments.outputModule |
| website/docs/en/config/output.mdx | Updated to remove experimental flag requirement and added automatic behavior description |
| website/docs/en/config/externals.mdx | Updated to reference output.module instead of experiments.outputModule |
| website/docs/en/config/experiments.mdx | Removed experiments.outputModule section |
| tests/rspack-test/**/*.js | Migrated 100+ test configurations from experiments.outputModule to output.module, with some containing duplicates |
| packages/rspack/src/config/types.ts | Removed outputModule from Experiments type definition |
| packages/rspack/src/config/normalization.ts | Removed outputModule from ExperimentsNormalized interface |
| packages/rspack/src/config/defaults.ts | Refactored to set output.module based on library types, but has ordering issue |
| packages/rspack/etc/core.api.md | Updated API documentation to remove experiments.outputModule |
| packages/rspack-test-tools/src/case/*.ts | Updated test tooling to use output.module |
| crates/rspack/src/builder/mod.rs | Removed outputModule from Rust builder implementation |
Comments suppressed due to low confidence (1)
website/docs/zh/config/output.mdx:1577
- The code example still includes the removed
experiments.outputModuleconfiguration. This should be removed to match the English documentation and align with the PR's refactoring. The example should only showoutput.module: truewithout any experimental flags.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
tests/rspack-test/configCases/node/filename-and-dirname/rspack.config.js
Outdated
Show resolved
Hide resolved
tests/rspack-test/configCases/module/non-webpack-require-warning/rspack.config.js
Outdated
Show resolved
Hide resolved
tests/rspack-test/configCases/library/modern-module-asset-entry/rspack.config.js
Outdated
Show resolved
Hide resolved
tests/rspack-test/configCases/node/filename-and-dirname/rspack.config.js
Outdated
Show resolved
Hide resolved
tests/rspack-test/configCases/externals/devtool-eval-concatenate-modules/rspack.config.js
Outdated
Show resolved
Hide resolved
tests/rspack-test/configCases/library/modern-module-dynamic-error/rspack.config.js
Outdated
Show resolved
Hide resolved
tests/rspack-test/configCases/node/filename-and-dirname/rspack.config.js
Outdated
Show resolved
Hide resolved
tests/rspack-test/configCases/asset-modules/entry-with-runtimeChunk/rspack.config.js
Outdated
Show resolved
Hide resolved
tests/rspack-test/configCases/library/module-terminal-binding/rspack.config.js
Outdated
Show resolved
Hide resolved
f23d3fb to
2747fab
Compare
Summary
Remove
experimental.outputModule.Now you only need to set
output.moduletotrueif you want esm for app.If you are building a library, when seting
library.typeto'module' | 'modern-module',output.module, Rspack will setoutput.moduletotrueautomaticallyRelated links
Checklist