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
@import-normalize "opinionated.css"; doesn't actually work #46
Comments
It doesn't seem to be working with Create React App (3.4.1) either: |
This one issue basically makes this otherwise really cool tool completely impossible to use in most modern day projects :( |
@Dan503 in the meantime, you can import it like this: @import 'normalize/opinionated'; and have the import plugin ignore that line: postcssImport({
filter(importPath) {
return !importPath.includes('normalize')
},
}), |
My problem is that Sass tries to import a file that doesn't exist. And i tried using a basic css file instead of an scss file but I'm using a Gatsby project and I think Gatsby tries to bundle all the CSS up into one thing so when i tried to add the import statement it complained about not being able to find the file. |
@Dan503 you have to tell Sass to ignore that import, don't know if there is a way though. |
I was able to get around Sass by importing a plain I still had a problem though because Gatsby still tried to import the css before compiling. It doesn't add that much bloat so I'm just importing the whole file and not using postcss-normalize. |
I’m interested in knowing the cause of this. The entire point of this library is so that exactly your kind of usage should work. |
Here's a minimum reproduction: https://github.com/adamwathan/postcss-normalize-bug
|
Okay so after a bit of source-diving, you can make this work currently using the following syntax:
Perhaps we just need to update the README here and not any actual code? |
Hey, I've tried in my css
However, it is not recognized, and the output remains
This should be supported since it's in the README and also a test is needed for this feature.
The text was updated successfully, but these errors were encountered: