-
-
Notifications
You must be signed in to change notification settings - Fork 746
feat: stabilize lazy compilation middleware #12429
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for rspack canceled.
|
There was a problem hiding this 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 stabilizes the lazyCompilationMiddleware by promoting it from the experimental experiments namespace to the main Rspack API. This change aligns with the earlier stabilization of the lazyCompilation configuration option in Rspack 1.5.
Key Changes
- Moved
lazyCompilationMiddlewarefromrspack.experiments.lazyCompilationMiddlewaretorspack.lazyCompilationMiddleware - Added deprecation marker to the old
experimentslocation for backward compatibility - Updated all documentation and code examples to use the new stable API
- Added JSDoc documentation for the newly stabilized middleware function
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
website/docs/en/guide/features/lazy-compilation.mdx |
Updated English documentation to reference the new stable API location and added migration notice |
website/docs/zh/guide/features/lazy-compilation.mdx |
Updated Chinese documentation to reference the new stable API location and added migration notice |
tests/e2e/fixtures/rspack.ts |
Updated test fixture to use the new stable API import |
packages/rspack/src/exports.ts |
Added top-level export for lazyCompilationMiddleware and marked the experiments version as deprecated |
packages/rspack/src/builtin-plugin/lazy-compilation/middleware.ts |
Added JSDoc comment documenting the middleware function |
packages/rspack/etc/core.api.md |
Updated TypeScript API definitions to reflect the stabilization and deprecation |
packages/rspack-test-tools/src/plugin/lazy-compilation-test-plugin.ts |
Updated test plugin to use the new stable API import |
packages/rspack-cli/src/commands/serve.ts |
Updated CLI serve command to use the new stable API |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Rsdoctor Bundle Diff AnalysisFound 5 project(s) in monorepo. 📁 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.20MB |
CodSpeed Performance ReportMerging #12429 will not alter performanceComparing Summary
|
Summary
Since the
lazyCompilationoption was stabilized in Rspack 1.5, we can also stabilizelazyCompilationMiddlewareto keep things consistent.Related links
Checklist