-
-
Notifications
You must be signed in to change notification settings - Fork 605
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
6.0.0+ generates invalid CSS when used in development mode #1365
6.0.0+ generates invalid CSS when used in development mode #1365
Comments
hm, it should never work as expected, you set body {
font-family: 'Manrope';
}
@import url(https://fonts.googleapis.com/css2?family=Manrope:wght@500;800&display=swap); it is invalid by CSS spec, |
Found a bug |
Anyway I recommend to use |
In some cases though you don't have control of the @alexander-akait thanks for the quick turnaround. |
Make sense, I will add more tests to avoid regressions in future |
Thanks! |
…to `2.2.1` Using `css-loader` version 6 exposed a bug in `mini-css-extract-plugin` which doesn't handle `@import` rules order correctly. See webpack-contrib/css-loader#1365 Closes: #21662
Expected Behavior
When used with extract css mini, css-loader 6.0.0+ breaks absolute
@import
rules in development mode because it generates invalid CSS since these rules must precede all other types of rules, except@charset
.See: https://developer.mozilla.org/en-US/docs/Web/CSS/@import#description
Actual Behavior
Development mode (incorrect)
production (correct)
Code
https://github.com/alan-agius4/css-loader-issue-import
How Do We Reproduce?
The text was updated successfully, but these errors were encountered: