Closed fafnirical closed 5 years ago
Hey @fafnirical,
node-sass-magic-importer
and node-sass-package-importer
do work with scoped packages.
I've tried the following to reproduce your problem, but everything worked as expected:
npm init
npm install node-sass-package-importer node-sass @glidejs/glide
echo '@import "~@glidejs/glide/src/assets/sass/glide.core";' > test.scss
npx node-sass --importer node_modules/node-sass-package-importer/dist/cli.js -o ./ test.scss
# A file test.css is generated with the contents of glide.core.scss
Please provide additional informations on how you initialized the importer package. Thx.
@maoberlehner, I've created an example repo where I'm able to reproduce the issue: https://github.com/fafnirical/node-sass-magic-importer-issue-182
For additional context, I'm using Node v10.11.0, npm v6.4.1, and Windows 10.
Works on my machine™ so I guess it has something to do with Windows. I have to admit, although I did run it once or twice on Windows, I almost exclusively develop and test this code on macOS. Usually I take care of handling file paths in a way that works cross OS but it seems I overlooked something.
I'll investigate. Pull requests are also welcome!
Btw. thank you @fafnirical for taking the time to create the repository. If people take the time to provide code examples, it helps a lot!
I can provide an example repo if necessary, but in particular I encountered this issue when trying to load Sass files from @glidejs/glide:
I get the following error: