-
Notifications
You must be signed in to change notification settings - Fork 22
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
Unable to use Sass built-in modules #143
Comments
I can confirm this issue and looking for a solutions :( |
@markhorgan how did you get this working? if i declare @use 'sass:math'; in my 'global.scss' i get following error: Or did you just dropped styleResources completely in this scenario? |
any solution to this would be great.
|
Probably not the most ideal solution to this problem (smarter and more patient minds than I could jump in), but I managed to get this working by adding the following to my nuxt.config.js:
I could then use I would be curious to know what the drawbacks to this method are, either in terms of testing/compilation time and/or app size, if any. |
https://github.com/shakacode/sass-resources-loader has |
👍 |
Support for that was added in v1.1.0 through #162 |
I cannot get this to work. Either I get |
Create a reproduction repo and someone will probably be able to help you. |
@riddla try removing |
Having the same problem. Removing |
@riddla did you found a hack for this? |
@rchl Having only one file using The problem comes when I import multiple files that use |
Please create reproduction |
I'm not able to create a reproduction. Codesandbox is shit. With the Nuxt's codesandbox template I'm not even able to use I don't have time to battle with a fake environment. What I can tell you is that I use:
|
You can create a repo locally and push it to GitHub |
Dude I don't have time to create a repo, and push it to GitHub to help you debug. You wanna reproduce :
|
You have an issue and not me so sorry but i won't spend time trying to reproduce it if you don't even care enough to create a straightforward reproduction. Even if there is an issue, it likely is in the sass-loader itself, to be fair. |
@rchl What about the two reproductions on CodeSandbox that I posted above? |
It did help here when I've tried it |
Here I created a repo @rchl. Same problem. It seems to come from using |
Might be some case that is not handled by @import 'constants';
@import 'functions';
@import 'mixins'; and import that instead. |
It seems to be working with on file importing (w/ Thanks @rchl! |
Temporary fix shakacode/sass-resources-loader#148 |
Using single quotes instead of double quotes doesn't fix the reproduction above. At least not fully, so there is likely another issue in the loader. Feel free to report an issue there if it's important for you. |
Still having this issue. |
In my case fixed by:
|
I'm using dart-sass node module but stylesheets loaded with the style resources module aren't able to load Sass built-in modules
E.g.
abstractions/units.scss:
@use "sass:math";
nuxt.config.js:
Results in the error:
SassError: Invalid Sass identifier "sass:math"
@use "abstractions/sass:math";
If I exclude the file from being loaded by style resources module and import it manually from my
global.scss
file it seems to work ok.The text was updated successfully, but these errors were encountered: