Closed james-camilleri closed 3 years ago
This may create a secondary problem. CodePen uses PostCSS Use (it predates Sass’s use) to use plugins. AFAIK, the two systems are wholly incompatible, as they reached for the same namespace for completely different reasons. In my opinion, Sass has the advantage here, as they are a superset of CSS, whereas this one plugin is not making the same claim.
The problem, for me, is that I could introduce a feature that breaks a website like CodePen, because folks reach for @use
and CodePen errors out because it’s not a valid plugin.
Use Plugin: https://github.com/postcss/postcss-use
Oh no, I had no idea that a separate @use
directive existed for postcss plugins. That is a problem. In addition, I've noticed that while the fix does allow for the plugin to be compatible with the new syntax, it ends up causing errors anyway because the CSS is actually injected before the SASS parser begins to process the stylesheets. This will require a different solution I believe. Thanks for the quick feedback though. :)
Closing this with the resolution that it will require a different solution.
Updated the import regex to also handle sass's
@use
directive, as described in #47.