-
-
Notifications
You must be signed in to change notification settings - Fork 237
fix: correct importLoaders count for node target
#6554
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 rsbuild ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
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.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
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 fixes the importLoaders count for the CSS loader when emitCss is disabled (e.g., for node target). When certain CSS loaders (lightningcss-loader and postcss-loader) are skipped for the normal CSS rule but still counted in importLoaders, the count needs to be corrected.
- Adds logic to decrement
importLoadersfor normal CSS rules whenemitCssis disabled - Updates test snapshots to reflect the corrected
importLoadersvalue (from 1 to 0)
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| packages/core/src/plugins/css.ts | Adds conditional logic to decrement importLoaders by 1 when emitCss is disabled for normal CSS rules |
| packages/core/tests/snapshots/environments.test.ts.snap | Updates snapshot to reflect corrected importLoaders value |
| packages/core/tests/snapshots/default.test.ts.snap | Updates snapshot to reflect corrected importLoaders value |
| packages/core/tests/snapshots/css.test.ts.snap | Updates snapshot to reflect corrected importLoaders value |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Summary
Related to #6553. The normal CSS rule having an incorrect importLoaders count when
emitCssis disabled.Related Links
Checklist