-
-
Notifications
You must be signed in to change notification settings - Fork 757
fix(cli): apply default lazy compilation value based on user config #12583
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.
|
fcfe403 to
1d9f372
Compare
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 refactors the CLI to read user configuration before creating the compiler, allowing for proper inspection of user-provided settings. Previously, compiler.options was set to default values by rspack/core, making it difficult to distinguish between user-specified and default values.
Key changes:
- Split
createCompilermethod intobuildCompilerConfigandcreateCompilerto separate config building from compiler creation - Moved
lazyCompilationdefault logic from rspack/core to rspack-cli's serve command, enabling conditional defaults based on user config - Changed default value of
lazyCompilationfrom conditional tofalsein rspack/core
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| packages/rspack-cli/src/cli.ts | Refactored to separate config building from compiler creation for better config inspection |
| packages/rspack-cli/src/commands/build.ts | Updated to use new two-step API: build config then create compiler |
| packages/rspack-cli/src/commands/serve.ts | Updated to use new API and handle lazyCompilation defaults conditionally based on user config and target platform |
| packages/rspack/src/config/defaults.ts | Simplified lazyCompilation default to always be false, moving conditional logic to CLI |
| tests/rspack-test/defaultsCases/default/base.js | Updated test expectations to reflect new lazyCompilation default value |
| tests/rspack-test/defaultsCases/target_/*.js | Updated test expectations for various target configurations |
| tests/e2e/cases/chunk/recover-error/rspack.config.js | Added explicit lazyCompilation setting for test case |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
1d9f372 to
4b0147a
Compare
Rsdoctor Bundle Diff AnalysisFound 5 projects in monorepo, 0 projects with changes. 📊 Quick Summary
Generated by Rsdoctor GitHub Action |
📦 Binary Size-limit
🙈 Size remains the same at 47.85MB |
CodSpeed Performance ReportMerging #12583 will not alter performanceComparing Summary
Footnotes
|
Summary
The
compiler.optionsis already set to default by rspack/core. We should load the user configuration in the CLI for future inspection.Related links
Checklist