fix(css): add node support for external @import#15818
Conversation
|
For maintainers only:
|
|
you should |
|
@vankop My bad, I have surely put a bad description and so you misunderstood the issue. /* test/configCases/css/external/style2.css */
body {
background: url(//example.com/image.png) url(https://example.com/image.png);
background-image: url(http://example.com/image.png);
}
/* test/configCases/css/external/style.css */
@import "style2.css";
@import "https://test.cases/path/../../../../configCases/css/external/external.css"; |
|
if you want to handle http/https protocol urls ( bundle assets from this protocol requests ) you should just enable https://webpack.js.org/configuration/experiments/#experimentsbuildhttp |
|
But it's not the wanted behavior. I don't want to bundle the remote CSS in the current compilation, I want Webpack to let me use the standard CSS behavior as described in https://developer.mozilla.org/en-US/docs/Web/CSS/@import. |
|
yeah.. as I said in separate PR we should support ignore option.. #15821 |
|
Sorry, I disagree. Why don't you want to hack the source assets with magic comments when you can easily handle the code? |
|
ok.. in css instead of ignoring request webpack creates ExternalModule and there is no support for |
My test is failing in some cases because I try to check that the |
542f3f0 to
e2616fc
Compare
|
@noreiller @sokra on vacation, he will be here in near future, your PRs on our radar, so don't worry |
|
Oh ok! Thanks for the update. |
|
Thanks |
Issue:
When using the CSS experiments and using @import in CSS code, the compilation fails with these error messages:
Changes:
This PR will handle the @import rules for node and add a dedicated test.
CSS example code: