-
Notifications
You must be signed in to change notification settings - Fork 19
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
Problem with :external
on SASS.
#568
Comments
this is libsass, not being able to properly parse these pseudo's. perhaps there is an alternative syntax that might work here that plays nicely with sass? not being able to use with sass is a blocker for us :/ |
|
This uses most of the custom modular-css syntax and it all appears to be removed correctly, leaving behind only valid CSS. |
You wouldn't run modular css first generally, same with css-modules. The sass/less/stylus compilation runs first, outputting css which you turn then process. In all likelihood module-css wouldn't be able to even run on sass files since it's not valid css |
Oops, that seems obvious in retrospect. Is there really no way to ignore unknown pseudos in SASS? Can you run something postcss-based first using postcss-scsss as the parser? I'm not thrilled about the idea of changing the syntax or supporting both the current version and an alternative. It matches the existing |
Oh, there might be another solution though it's a bit gross. You could write a postcss plugin to convert a SASS-compatible version of Just a theory, but should be totally possible. I get it if that's a bridge too far but figured I'd kick the idea out there just in case it helped. |
btw trying to get this fixed upstream in libsass sass/libsass#2990 |
Looks like this got fixed upstream thanks to @jquense! |
for others, if using node-sass, it's gonna be a while before it makes it into a release :/ That project seems like it's years behind the current sass version |
I'm using modular-css with SASS, Webpack. When I use
:external
, sass-loader causes an error.Expected Behavior
I want to make
:external
work with sass-loader.Current Behavior
When I run a server with
npm run start
, I got an error likePossible Solution
Steps to Reproduce (for bugs)
git clone https://github.com/hemmxwxsoo/modular-css-with-sass-test
cd modular-css-with-sass-test
npm install
npm run start
Webpack config's path :
./configs/webpack/common.js
components path :
./src/components
Context
Your Environment
modular-css
npm --version
node --version
The text was updated successfully, but these errors were encountered: