Test css more#20771
Conversation
🦋 Changeset detectedLatest commit: 9f544fa 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 |
|
This PR is packaged and the instant preview is available (91aa5da). Install it locally:
npm i -D webpack@https://pkg.pr.new/webpack@91aa5da
yarn add -D webpack@https://pkg.pr.new/webpack@91aa5da
pnpm add -D webpack@https://pkg.pr.new/webpack@91aa5da |
There was a problem hiding this comment.
Pull request overview
This PR expands CSS Modules test coverage (notably re-exporting and composition scenarios) and updates webpack’s internal ICSS parsing/resolution logic to fix CSS Modules symbol/value resolution.
Changes:
- Added a new
css/reexportconfig case with multi-mode builds and snapshot assertions for emitted CSS + JS exports. - Refactored ICSS import/export/symbol dependency modeling and resolution (including
@valueparsing andcomposeshandling). - Updated multiple existing snapshot baselines and warning expectations to reflect the new resolution behavior.
Reviewed changes
Copilot reviewed 38 out of 38 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| test/configCases/css/reexport/webpack.config.js | New config case running in development + production for CSS experiments. |
| test/configCases/css/reexport/index.js | Snapshot test asserting emitted CSS and module exports. |
| test/configCases/css/reexport/test.config.js | Injects generated CSS into the test DOM via <link>. |
| test/configCases/css/reexport/styles.module.css | Comprehensive fixture covering @value, reexports, composes, globals, custom properties, etc. |
| test/configCases/css/reexport/value-at-rule.module.css | Fixture for @value ... from ... and indirect imports. |
| test/configCases/css/reexport/theme.module.css | Fixture for chained @value reexports. |
| test/configCases/css/reexport/colors.module.css | Fixture for values + deep import. |
| test/configCases/css/reexport/colors-more.module.css | Fixture backing deep value imports. |
| test/configCases/css/reexport/selectors.module.css | Fixture for selector value imports/reexports. |
| test/configCases/css/reexport/selectors-more.module.css | Fixture backing selector reexports. |
| test/configCases/css/reexport/cyclical.module.css | Fixture for cyclical ICSS cases. |
| test/configCases/css/reexport/vars.module.css | Fixture for custom properties / vars. |
| test/configCases/css/reexport/shared-custom-properties.module.css | Fixture for shared custom properties with deep var() usage. |
| test/configCases/css/reexport/shared-deep-custom-properties.module.css | Fixture for deep custom properties. |
| test/configCases/css/reexport/reset.module.css | Fixture used via composes chain. |
| test/configCases/css/reexport/atoms-extra.module.css | Fixture used via composes chain. |
| test/configCases/css/reexport/atoms.module.css | Fixture used via composes chain. |
| test/configCases/css/reexport/button.module.css | Fixture for reexported class composition. |
| test/configCases/css/reexport/button-reexport.module.css | Fixture for reexport target. |
| test/configCases/css/reexport/classes-deep.module.css | Fixture for deep selector/class export chains. |
| test/configCases/css/reexport/classes.module.css | Fixture for selector exports and nested imports. |
| test/configCases/css/reexport/classes-the-same.module.css | Fixture to validate same class names across modules. |
| test/configCases/css/reexport/abcd.modules.css | Fixture for imported class sets used in composes. |
| test/configCases/css/reexport/pseudo-import-and-export.module.css | Fixture for :import/:export pseudo rules and reexport chaining. |
| test/configCases/css/reexport/pseudo-import-and-export-deep.module.css | Fixture for deeper pseudo import/export chaining. |
| test/configCases/css/reexport/pseudo-import-and-export-deep-more.module.css | Fixture for deepest pseudo export leaf. |
| test/configCases/css/reexport/snapshots/ConfigTest.snap | New snapshots for the reexport case. |
| test/configCases/css/reexport/snapshots/ConfigCacheTest.snap | New cache-mode snapshots for the reexport case. |
| test/configCases/css/css-modules/warnings.js | Adds expected warning for additional broken @value form. |
| test/configCases/css/postcss-modules-plugins/snapshots/ConfigTest.snap | Snapshot updates reflecting new resolution/composes behavior. |
| test/configCases/css/postcss-modules-plugins/snapshots/ConfigCacheTest.snap | Cache snapshot updates reflecting new resolution/composes behavior. |
| test/configCases/css/css-loader/snapshots/ConfigTest.snap | Snapshot updates reflecting new class aggregation results. |
| test/configCases/css/css-loader/snapshots/ConfigCacheTest.snap | Cache snapshot updates reflecting new class aggregation results. |
| lib/dependencies/CssIcssSymbolDependency.js | Refactors symbol dependency shape to support new resolution model. |
| lib/dependencies/CssIcssImportDependency.js | Simplifies ICSS import dependency to focus on import/local naming. |
| lib/dependencies/CssIcssExportDependency.js | Adds new resolve logic, composes export type, and reference aggregation. |
| lib/css/CssParser.js | Reworks @value parsing and ICSS definition tracking for reexports/composes/custom props. |
| .changeset/clean-radios-punch.md | Patch changeset documenting the CSS Modules resolving fix. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Merging this PR will degrade performance by 25.55%
Performance Changes
Comparing |
Summary
bugfix
What kind of change does this PR introduce?
fix
Did you add tests for your changes?
Yes
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?
Nothing
Use of AI
No