Why does rewriteImports
not support paths outside __dirname(file)
?
#101
Labels
rewriteImports
not support paths outside __dirname(file)
?
#101
I'm using Google's Material Design framework and decided to try to use
sass-resources-loader
because I hear that importing mixins directly in my SCSS files degrades build times (is this true?). However, it seems that all of the mixins in the framework import other shared mixins and variables from elsewhere in the framework's tree. For example:Such paths are imported by
sass-resources-loader
as:../../node_modules/@material/tab-bar/@material/feature-targeting/mixins.
Notice how the path to import is appended to the file's base path. I'm surprised that nobody else has had this problem. Maybe I'm doing something wrong? Or maybe Google's Material Design framework is the only framework that shares mixins like this?I suppose the only fix is to support an OS-style
$PATH
array? Or to check if the path it import starts with./
?Here is the current rewrite code in this repo for reference:
https://github.com/shakacode/sass-resources-loader/blob/master/src/utils/rewriteImports.js#L26
The text was updated successfully, but these errors were encountered: