fix: CSS @import should inherit parent's exportType over parser config#20838
fix: CSS @import should inherit parent's exportType over parser config#20838alexander-akait merged 2 commits intomainfrom
Conversation
🦋 Changeset detectedLatest commit: f27d468 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 (1ef747c). Install it locally:
npm i -D webpack@https://pkg.pr.new/webpack@1ef747c
yarn add -D webpack@https://pkg.pr.new/webpack@1ef747c
pnpm add -D webpack@https://pkg.pr.new/webpack@1ef747c |
Codecov Report✅ All modified and coverable lines are covered by tests. ❌ Your changes status has failed because you have indirect coverage changes. Learn more about Unexpected Coverage Changes and reasons for indirect coverage changes. Additional details and impacted files@@ Coverage Diff @@
## main #20838 +/- ##
==========================================
- Coverage 91.44% 91.43% -0.01%
==========================================
Files 562 562
Lines 55438 55438
Branches 14636 14636
==========================================
- Hits 50695 50691 -4
- Misses 4743 4747 +4
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| }, | ||
| plugins: [ | ||
| new webpack.DefinePlugin({ | ||
| "process.env.BROWSER": JSON.stringify(true) |
There was a problem hiding this comment.
No need—I’ll delete it
7993485 to
b5bab26
Compare
Merging this PR will degrade performance by 32.19%
|
| Mode | Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|---|
| ⚡ | Memory | benchmark "future-defaults", scenario '{"name":"mode-production","mode":"production"}' |
9.7 MB | 7.7 MB | +26.32% |
| ❌ | Memory | benchmark "asset-modules-source", scenario '{"name":"mode-development-rebuild","mode":"development","watch":true}' |
264.3 KB | 389.7 KB | -32.19% |
Comparing test/export-type-style-text-mixed-import (f27d468) with main (8c7700b)
alexander-akait
left a comment
There was a problem hiding this comment.
Thanks, will rebase and merge after #20831, so don't worry
When a CSS file is @imported by another CSS file, the child module's exportType should be determined by the parent's exportType first, falling back to the child's own parser config. Previously the child's parser config took precedence, which meant a file configured as "text" would not create a style tag even when @imported by a "style" parent.
b5bab26 to
f27d468
Compare
Summary
fix: CSS @import should inherit parent's exportType over parser config
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