Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does not work together with option includePaths? #33

Open
nirazul opened this issue May 23, 2016 · 1 comment
Open

Does not work together with option includePaths? #33

nirazul opened this issue May 23, 2016 · 1 comment

Comments

@nirazul
Copy link

nirazul commented May 23, 2016

I've tried out the plugin in conjunctions with gulp-sass and the includePaths option with a path to my node_modules folder. Now the following import statements fail:

@import 'node_modules/reset-css/reset.scss';
@import 'node_modules/include-media/dist/include-media.scss';

They are at the right place, I've checked with cd and ls, so my guess is that node-sass-import-once fails to load them. Everything seems fine when disabling the importer option.

Versions:

  • node -v: 5.9.1
  • npm -v: 3.8.6
  • node-sass-import-once: 1.2.0
  • gulp: 3.9.1

Stack trace:

Error: Could not import `node_modules/reset-css/reset.scss` from any of the following locations:
  /Users/myname/Documents/Repositories/myrepo/myrepo/assets/src/scss/app/node_modules/reset-css/reset.scss
  /Users/myname/Documents/Repositories/myrepo/myrepo/assets/src/scss/app/node_modules/reset-css/reset.scss
  /Users/myname/Documents/Repositories/myrepo/frontend/node_modules/reset-css/reset.scss
@nirazul
Copy link
Author

nirazul commented May 23, 2016

I've just realized that everything works fine when including it with the underscored name:
@import 'node_modules/reset-css/_reset.scss';

So there seems to be a slight implementation difference between includePaths imports and normal imports.

EDIT:
It also works when importing it in this syntax: @import 'node_modules/reset-css/reset';
So I'm not sure anymore if this is a bug at all or just a slight inconsistency that it did work before in the first place.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant