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

can not found file under includePaths with out underline prefix in file name #110

Closed
oopschen opened this issue Jun 24, 2015 · 5 comments
Closed

Comments

@oopschen
Copy link
Contributor

please refer detail in stackoverflow

Is this a bug or the feature? Please help me out, thx!

@sogko
Copy link

sogko commented Jun 24, 2015

Hi, I believe this is a duplicate of #98

Seems like a bug (but with an ugly workaround)

@oopschen
Copy link
Contributor Author

After 10 hours's digging, i find the solution:

libsass importer feature

importer in node-sass is an experimental feature, so i do some test on it. I conclude that:
When libsass encounter import directive, it first call the importer to resolve the file.

  • If any error happens, the importer must return Error or call done with an Error.
  • If the importer return absolute path, the libsass read the file content.
  • If the importer return an relative path, the libsass will search in the includePaths if configured

sass-loader bug

resolve process:

  • resolve module in webpack by the original name
  • resolve module in webpack by the name prefiexed by underline
  • done or return with file: the name prefiexed by underline

the last step cause the bug, it must return the original name. Thus, the libsass will complete the job in includePath.

BTW, how can i commit the bugfix?

@sogko
Copy link

sogko commented Jun 28, 2015

hi @oopschen,

that sounds plausible as a fix; you can try to post the suggested solution at #98 to gain more attention or simply create a pull request.

@jhnns
Copy link
Member

jhnns commented Jun 30, 2015

@oopschen Thx for investigating this! See PR for discussion.

@jhnns
Copy link
Member

jhnns commented Jul 22, 2015

Should be fixed with 1.0.3

@jhnns jhnns closed this as completed Jul 22, 2015
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

3 participants