-
-
Notifications
You must be signed in to change notification settings - Fork 775
tests: enable lazy-compilation(no merge) #11289
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
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 enables lazy compilation by default in Rspack, changing the default value from false
to true
and setting up default configuration options for entries and imports when lazy compilation is enabled.
- Updates default value for
experiments.lazyCompilation
fromfalse
totrue
- Configures default lazy compilation options with
entries: true
andimports: true
- Updates documentation to reflect the new default value
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
packages/rspack/src/config/defaults.ts | Changes default lazy compilation from false to an object with entries and imports set to true |
packages/rspack/src/config/types.ts | Updates JSDoc comment to reflect new default value |
website/docs/en/config/experiments.mdx | Updates English documentation default value |
website/docs/zh/config/experiments.mdx | Updates Chinese documentation default value |
packages/rspack-test-tools/tests/legacy-test/MultiCompiler.test.js | Explicitly disables lazy compilation in test to maintain existing behavior |
packages/rspack-test-tools/tests/snapshots/Defaults.test.js.snap | Updates snapshot to reflect new default configuration |
if (typeof experiments.lazyCompilation === "object") { | ||
D(experiments.lazyCompilation, "entries", true); | ||
D(experiments.lazyCompilation, "imports", true); | ||
} |
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.
Setting an empty object as the default and then conditionally populating it creates unnecessary complexity. Consider directly setting the default object with the desired properties: D(experiments, "lazyCompilation", { entries: true, imports: true });
} | |
D(experiments, "lazyCompilation", { entries: true, imports: true }); |
Copilot uses AI. Check for mistakes.
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.
📦 Binary Size-limit
🙈 Size remains the same at 50.36MB |
CodSpeed Performance ReportMerging #11289 will not alter performanceComparing Summary
|
Summary
This PR enables lazy compilation by default in Rspack, making it an out-of-the-box optimization for better development experience without requiring explicit configuration.
🚀 Context & Motivation
This change aligns with the Rspack 1.5 Release Plan discussion (#10867), where lazy compilation was identified as a key feature for improving development experience. As mentioned in the discussion:
Related links
Checklist