Sass @use won't import partial
I'm working on a project with vite. I'm trying to import a partial, but for some reason I keep getting an error saying can't find stylesheet to import
File structure:
App.scss
Error Message
4 Replies
Do you have sass installed as one of your dependencies? I don't think it's added by default in Vite like it is in CRA
I ran "npm install -D sass" if thats what you mean
Yea it is. Did you try
@use "variables/colors"
?you need to add
_index.scss
file in each of your directories, and inside of it you're going to @forward
all files that directory contains.
So your folder structure should look something like this:
Ans then, _index.scss
inside of your 'variables' should look something like this:
Same goes for 'components'.