sass / migrator

Tool for migrating stylesheets to new Sass versions
MIT License
84 stars 10 forks source link

Relative imports from node_modules are handled incorrectly #100

Closed nex3 closed 4 years ago

nex3 commented 4 years ago

Currently, if a file imported through node_modules contains a relative import, that relative URL is used as-is in referencing files:

<==> input/entrypoint.scss
@import "~module/dependency";

a {
  color: $variable;
}

<==> input/node_modules/module/_dependency.scss
@import "other";

<==> input/node_modules/module/_other.scss
$variable: green;

This should produce @use "~module/other", but it currently produces @use "other" which is just broken.