-
-
Notifications
You must be signed in to change notification settings - Fork 604
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: deduplicate css module for @import #1044
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1044 +/- ##
=======================================
Coverage 98.14% 98.14%
=======================================
Files 10 10
Lines 484 484
Branches 150 149 -1
=======================================
Hits 475 475
Misses 8 8
Partials 1 1
Continue to review full report at Codecov.
|
} | ||
", | ||
"", | ||
], | ||
Array [ | ||
"../../src/index.js?[ident]!./import/test.css", | ||
".test { | ||
a: a; | ||
} | ||
", | ||
"", | ||
], | ||
Array [ | ||
"../../src/index.js?[ident]!./import/test.css", | ||
".test { | ||
a: a; | ||
} | ||
", | ||
"", | ||
], | ||
Array [ | ||
"../../src/index.js?[ident]!./import/test.css", | ||
".test { | ||
a: a; | ||
} | ||
", | ||
"", | ||
], | ||
Array [ | ||
"../../src/index.js?[ident]!./import/test.css", | ||
".test { | ||
a: a; | ||
} | ||
", | ||
"", | ||
], | ||
Array [ | ||
"../../src/index.js?[ident]!./import/test.css", | ||
".test { | ||
a: a; | ||
} | ||
", | ||
"", | ||
], | ||
Array [ | ||
"../../src/index.js?[ident]!./import/test.css", | ||
".test { | ||
a: a; | ||
} | ||
", | ||
"", | ||
], | ||
Array [ | ||
"../../src/index.js?[ident]!./import/test.css", | ||
".test { | ||
a: a; | ||
} | ||
", | ||
"", | ||
], | ||
Array [ | ||
"../../src/index.js?[ident]!./import/test.css", | ||
".test { | ||
a: a; | ||
} | ||
", | ||
"", | ||
], | ||
Array [ | ||
"../../src/index.js?[ident]!./import/test.css", | ||
".test { | ||
a: a; | ||
} | ||
", | ||
"screen and (orientation:landscape)", | ||
], | ||
Array [ | ||
"../../src/index.js?[ident]!./import/test.css", | ||
".test { | ||
a: a; | ||
} | ||
", | ||
"screen and (orientation: landscape)", | ||
], | ||
Array [ | ||
"../../src/index.js?[ident]!./import/test.css", | ||
".test { | ||
a: a; | ||
} | ||
", | ||
"screen and (orientation:landscape)", | ||
], | ||
Array [ | ||
"../../src/index.js?[ident]!./import/test.css", | ||
".test { | ||
a: a; | ||
} | ||
", | ||
"screen and (orientation:landscape)", | ||
], |
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.
They are de-duplicated.
Array [ | ||
"./import/import.css", | ||
"@import url(http://example.com/style.css);", | ||
"", | ||
true, | ||
], | ||
Array [ | ||
"./import/import.css", | ||
"@import url(http://example.com/style.css);", | ||
"", | ||
true, |
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.
Do they need to be de-duplicated? It's the url
case.
If the de-duplication is necessary in all cases, probably we should change the runtime #1040 (comment).
|
This PR contains a:
Motivation / Use-Case
composes
is fixed in https://github.com/webpack-contrib/css-loader/pull/1040/files#diff-2b4ca49d4bb0a774c4d4c1672d7aa781R329 but@import
isn't.The use-case can be refereed to the added test case.
"source" which imports "black" which composes "color" and;
"source" which imports "swhite" which composes "color".
On this case, the "color" module gets duplicated.
Breaking Changes
No
Additional Info
N/A