I have a sass variable declared in the file _variables.scss. When I import that file using @use, I get an error when compiling stating "Error: undefined variable". If however, I use @import instead, everything compiles just fine.
Here's the first file which is imported
//_variables.scss
$primaryColor: rgba(199, 26, 113, 0.747);
And here's the file which is doing the importing.
//styles.scss
@use 'variables';
header {
background: $primaryColor;
}
When compiling this returns "Error: undefined variable". But if I change @use to @import, it works just fine.
Why does @import work but @use does not?