Closed JamiesonRoberts closed 5 years ago
NOTE: I do recognize that there is the force import option, but as you probably realized in making that the option not the default, there is massive power in being able to specify where it gets inserted.
@JamiesonRoberts, even if there’s not a technical fix for this (I don’t know if there is), I suspect there may be a technical strategy to avoid this issue. Could you create a minimal project with this bug and post it on GitHub? I will check it out, replicate the issue, and then work on a fix for you.
@jonathantneal I'll get a minimal project to you this weekend to take a look!
Cheers
Hi @JamiesonRoberts, is this still something you can pursue?
Maybe this workaround works:
normalize.css
@import-normalize;
main.scss
@import 'normalize.css';
/* Rest of styles */
Sass should ignore the .css
file and inline it (?), then postcss will do the rest if it parse .css
extensions.
That solution should work, @equinusocio. I’d love to work something out with the postcss import team, maybe like a custom import hook.
In the past I've loved using your plugin for this, but I'm currently running into an issue (specifically in this case with laraval mix, but would apply to any precompiled versions of CSS) where the custom import declaration breaks builds for SASS/SCSS due to the fact that its not recognizing the import signature.
I get that its a postCSS tool, but there are lots of people who use PostCSS in conjunction with other formats of CSS processing. Thoughts on how to make it so that it works not only in the PostCSS landscape, but also with other precompiled formats?