GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(css): include chunk groups in conflicting order warning by aryanraj45 · Pull Request #20660 · webpack/webpack

Conversation

@aryanraj45

@aryanraj45 aryanraj45 commented Mar 17, 2026

Copy link
Copy Markdown
Member

Summary

This pull request resolves an explicit TODO: print better warning inside CssModulesPlugin.js.

Previously, when two CSS modules imported each other in conflicting orders across different chunk groups, the console warning only printed the names of the two conflicting modules. This left developers guessing which chunk groups were causing the loop.

This change taps into the existing modulesByChunkGroup collection to filter and append the exact chunk groups causing the conflict directly to the WebpackError.

What kind of change does this PR introduce?

fix / developer experience (DX)

Did you add tests for your changes?

Yes. I updated the existing snapshot regex in test/configCases/css/conflicting-order/warnings.js to strictly assert that the new caused by chunk groups ... message is being correctly generated during the failure loop.

Does this PR introduce a breaking change?

No.
If relevant, what needs to be documented once your changes are merged or what have you already documented?

No documentation changes needed.

Use of AI

No AI ,Only used in formatting and writing the PR description

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@aryanraj45
fix(css): include chunk groups in conflicting order warning
30a7a81
Resolves a TODO in CssModulesPlugin to print a better warning when CSS module
imports conflict. It now surfaces the specific chunk groups causing the conflict
instead of only printing the conflicting module files. Updates the related
diagnostic test to assert this new console output.
Copilot AI review requested due to automatic review settings March 17, 2026 15:05
@changeset-bot

changeset-bot Bot commented Mar 17, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: b9b212a

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
webpack Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Copilot started reviewing on behalf of aryanraj45 March 17, 2026 15:06
View session
Copilot AI reviewed Mar 17, 2026
View reviewed changes

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 improves the developer-facing warning emitted by CssModulesPlugin when CSS modules end up in an unresolvable conflicting order across chunk groups, by appending the chunk group(s) involved to the warning text.

Changes:

  • Track the originating chunkGroup alongside each per-chunk-group module ordering list.
  • Extend the “Conflicting order…” warning message to include caused by chunk groups ....
  • Update the config-case warning expectation regex to assert the new message suffix.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
lib/css/CssModulesPlugin.js Attaches chunk group identifiers to the conflicting-order warning by plumbing chunkGroup through modulesByChunkGroup.
test/configCases/css/conflicting-order/warnings.js Updates the expected warning pattern to include the new caused by chunk groups ... line.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread lib/css/CssModulesPlugin.js Resolved

Uh oh!

There was an error while loading. Please reload this page.

@aryanraj45

aryanraj45 commented Mar 18, 2026

Copy link
Copy Markdown
Member Author

Hii @alexander-akait can u please take a view on this thanks!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

alexander-akait
alexander-akait reviewed Mar 18, 2026
View reviewed changes
Comment thread test/configCases/css/conflicting-order/warnings.js Outdated
module.exports = [
[/Conflicting order between css \.\/b\.css and css \.\/c\.css/]
[
/Conflicting order between css \.\/b\.css and css \.\/c\.css\ncaused by chunk groups css, css/

@alexander-akait alexander-akait Mar 18, 2026

Copy link
Copy Markdown
Member

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.

Please test full message, it doesn't look better

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

aryanraj45 reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
@aryanraj45
fix(css): deduplicate chunk group names in warning
cf11cd9
alexander-akait
alexander-akait reviewed Mar 18, 2026
View reviewed changes
Comment thread test/configCases/css/conflicting-order/warnings.js Outdated
module.exports = [
[
/Conflicting order between css \.\/b\.css and css \.\/c\.css\ncaused by chunk groups css, css/
/Conflicting order between css \.\/b\.css and css \.\/c\.css\nConflict is caused by the following chunk groups: css/

@alexander-akait alexander-akait Mar 18, 2026

Copy link
Copy Markdown
Member

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.

So we have only one group here? Still looking is unreadable

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@aryanraj45
fix(css): handle singular chunk group warning grammatically
169b7cc
alexander-akait
alexander-akait reviewed Mar 18, 2026
View reviewed changes
Comment thread lib/css/CssModulesPlugin.js Outdated
)}\nConflict is caused by the following chunk groups: ${[...conflictingGroups].join(", ")}`
)}\ncaused by chunk group${
groups.length > 1 ? "s" : ""
} ${groups.join(", ")}`

@alexander-akait alexander-akait Mar 18, 2026

Copy link
Copy Markdown
Member

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.

Sorry, adding s or , is not fixing the unreadable problem, we should improve it by writing understandable error message, what is chunk group css? I know, you may know, but developers will not know, better error message is when you understand where and which modules are conflict

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@aryanraj45
aryanraj45 force-pushed the fix-fresh-css-warning-2 branch 2 times, most recently from 8150505 to 169b7cc Compare March 18, 2026 13:13
@aryanraj45

aryanraj45 commented Mar 18, 2026

Copy link
Copy Markdown
Member Author

@alexander-akait can u please take a view again I have Updated the warning to show the actual files that imported the conflicting CSS instead of chunk group names.

Now outputs would be something like this
Conflicting order between css ./b.css
and css ./c.css
CSS modules are imported in:

  • css ./lazy1.css
  • css ./lazy2.css

Let me know if this looks good.Thanks!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

alexander-akait
alexander-akait reviewed Mar 18, 2026
View reviewed changes
Comment thread lib/css/CssModulesPlugin.js Outdated
}
}
return [...issuers];
};

@alexander-akait alexander-akait Mar 18, 2026

Copy link
Copy Markdown
Member

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.

I feel like it is AI generated code, because we don't use such patterns to make the same things, we have getIncomingConnectionsByOriginModule and more

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@aryanraj45
fix(css): trace conflicting modules back to their direct issuers
0b9890f
@aryanraj45
aryanraj45 force-pushed the fix-fresh-css-warning-2 branch from 455161f to 0b9890f Compare March 18, 2026 14:11
@aryanraj45
aryanraj45 requested a review from alexander-akait March 18, 2026 14:49
@aryanraj45

aryanraj45 commented Mar 19, 2026

Copy link
Copy Markdown
Member Author

@alexander-akait can u please re-review it again i have used the same getincomingconnectionbyoriginmodule for modulegraph extraction

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

alexander-akait
alexander-akait approved these changes Mar 21, 2026
View reviewed changes
@codspeed

codspeed Bot commented Mar 21, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Merging this PR will degrade performance by 33.97%

⚠️ Different runtime environments detected

Some benchmarks with significant performance changes were compared across different runtime environments,
which may affect the accuracy of the results.

Open the report in CodSpeed to investigate

⚡ 3 improved benchmarks
❌ 2 regressed benchmarks
✅ 121 untouched benchmarks
⏩ 18 skipped benchmarks1

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Mode Benchmark BASE HEAD Efficiency
❌ Simulation benchmark "context-commonjs", scenario '{"name":"mode-development-rebuild","mode":"development","watch":true}' 32.9 ms 41.3 ms -20.45%
⚡ Memory benchmark "wasm-modules-sync", scenario '{"name":"mode-production","mode":"production"}' 7.6 MB 6.2 MB +22.96%
⚡ Memory benchmark "context-esm", scenario '{"name":"mode-production","mode":"production"}' 10.5 MB 8.7 MB +20.3%
❌ Memory benchmark "asset-modules-source", scenario '{"name":"mode-development-rebuild","mode":"development","watch":true}' 265.9 KB 402.7 KB -33.97%
⚡ Memory benchmark "many-modules-commonjs", scenario '{"name":"mode-development-rebuild","mode":"development","watch":true}' 520.5 KB 393.5 KB +32.27%

Comparing aryanraj45:fix-fresh-css-warning-2 (b9b212a) with main (a475512)

Open in CodSpeed

Footnotes

  1. 18 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@aryanraj45

aryanraj45 commented Mar 23, 2026

Copy link
Copy Markdown
Member Author

@alexander-akait ci all required test passed! Ready for merge thanks!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@alexander-akait
Create brown-goats-kiss.md
b9b212a
@alexander-akait
alexander-akait merged commit 70867d6 into webpack:main Mar 23, 2026
51 of 54 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@github-actions

github-actions Bot commented Mar 23, 2026

Copy link
Copy Markdown
Contributor

This PR is packaged and the instant preview is available (70867d6).

Install it locally:

  • npm
npm i -D webpack@https://pkg.pr.new/webpack@70867d6
  • yarn
yarn add -D webpack@https://pkg.pr.new/webpack@70867d6
  • pnpm
pnpm add -D webpack@https://pkg.pr.new/webpack@70867d6
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions github-actions Bot mentioned this pull request Mar 23, 2026
chore(release): new release #20593
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

Copilot code review Copilot
Copilot review effort
Applies to this pull request for everyone.Learn more about Copilot code review.
Copilot left review comments
@alexander-akait alexander-akait alexander-akait approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@aryanraj45 @alexander-akait
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.