Skip to content

Conversation

@chenjiahan
Copy link
Member

Summary

Related to #6553. The normal CSS rule having an incorrect importLoaders count when emitCss is disabled.

Related Links

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

Copilot AI review requested due to automatic review settings November 11, 2025 14:27
@netlify
Copy link

netlify bot commented Nov 11, 2025

Deploy Preview for rsbuild ready!

Name Link
🔨 Latest commit ea03876
🔍 Latest deploy log https://app.netlify.com/projects/rsbuild/deploys/691349fa56b6970008f4211a
😎 Deploy Preview https://deploy-preview-6554--rsbuild.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 64 (🔴 down 7 from production)
Accessibility: 97 (no change from production)
Best Practices: 100 (no change from production)
SEO: 100 (no change from production)
PWA: 60 (no change from production)
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a 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".

Copilot finished reviewing on behalf of chenjiahan November 11, 2025 14:31
Copy link
Contributor

Copilot AI left a 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 importLoaders for normal CSS rules when emitCss is disabled
  • Updates test snapshots to reflect the corrected importLoaders value (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.

@chenjiahan chenjiahan merged commit 8183fc0 into main Nov 11, 2025
11 checks passed
@chenjiahan chenjiahan deleted the import_loaders_1111 branch November 11, 2025 14:49
@chenjiahan chenjiahan mentioned this pull request Nov 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants