Closed Yegorich555 closed 5 years ago
Something wrong with configuration, instead link, you have part of CSS
Looks like such using @import ...
inside css doesn't work with linkTag option:
@import "normalize.css";
@import "sanitize.css";
@import "fontface.css";
body {
font-family: "OpenSans-Regular", sans-serif;
}
....
@Yegorich555 Don't use linkTag
with css-loader
, linkTag
only for css files loaded using file-loader
https://github.com/webpack-contrib/style-loader#linktag
Ok. I see - I just wanted to use link-tag option for improving debugging - it's helpful when you see the real path in a browser... Thanks for spending time. If you add more details into README it can be helpful for other users.
@Yegorich555 yep, anyway feel free to send a PR to docs too
Expected Behavior
Style-loader should integrate styles into a links without errors
Actual Behavior
Style-loader can't upload styles when we set
options:{ injectType:'linkTag'}
and browser-console-error isCode
Please use the following git-repo: https://github.com/Yegorich555/FromScratch_React/tree/styleloader-update
How Do We Reproduce?
Just run
npm run serve
and you will catch console-error during uploading stylesIs it some conflict in webpack configuration or is it just style-loader bug? Please let me know how it can be resolved if this is not style-loader issue at all.