GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — fix(css): include chunk groups in conflicting order warning by aryanraj45 · Pull Request #20660 · webpack/webpack Conversation
Member
Summary This pull request resolves an explicit 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 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 Does this PR introduce a breaking change? No. 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 reactionsResolves 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.
|
There was an error while loading. Please reload this page.
🦋 Changeset detectedLatest commit: b9b212a The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
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:
chunkGroup alongside each per-chunk-group module ordering list.caused by chunk groups ....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.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Hii @alexander-akait can u please take a view on this thanks! |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| 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/ |
There was a problem 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.
There was an error while loading. Please reload this page.
| 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/ |
There was a problem 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.
There was an error while loading. Please reload this page.
| )}\nConflict is caused by the following chunk groups: ${[...conflictingGroups].join(", ")}` | ||
| )}\ncaused by chunk group${ | ||
| groups.length > 1 ? "s" : "" | ||
| } ${groups.join(", ")}` |
There was a problem 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.
There was an error while loading. Please reload this page.
8150505 to
169b7cc
Compare
|
@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
Let me know if this looks good.Thanks! |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| } | ||
| } | ||
| return [...issuers]; | ||
| }; |
There was a problem 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.
There was an error while loading. Please reload this page.
455161f to
0b9890f
Compare
|
@alexander-akait can u please re-review it again i have used the same getincomingconnectionbyoriginmodule for modulegraph extraction |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Merging this PR will degrade performance by 33.97%
|
| 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)
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. ↩
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@alexander-akait ci all required test passed! Ready for merge thanks! |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
This PR is packaged and the instant preview is available (70867d6). Install it locally:
npm i -D webpack@https://pkg.pr.new/webpack@70867d6
yarn add -D webpack@https://pkg.pr.new/webpack@70867d6
pnpm add -D webpack@https://pkg.pr.new/webpack@70867d6 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.