Allow generic @imports
Opened this issue · 5 comments
pierluigi commented
Wouldn't it make sense to simply allow something like @import theme(colors)
? We rely on postcss-css-variables
and we don't need postcss-modules-values
, so we'd simply like this plugin to inject the correct theme folder path.
This is the error
Error:
@import 'theme(colors)';
^
File to import not found or unreadable: theme(colors)
Any thoughts?
andywer commented
Hi @pierlo-upitup. I think the problem is only related to the apostrophes.
Have you tried @import theme(colors);
?
pierluigi commented
Error:
@import theme(colors);
^
@import directive requires a url or quoted path
pierluigi commented
I believe the problem is postcss-theme
is run after sass in my case. I will double-check.
andywer commented
Yeah, that would explain the issue 😉
Worst case: You need to run PostCSS before and after SASS.
andywer commented
@pierlo-upitup Any updates on this?