-
Notifications
You must be signed in to change notification settings - Fork 28
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
node-sass-magic-importer: Transitive imports broken #188
Comments
Maybe I don't understand the problem correctly but from what I understand about the problem, I tend to disagree.
In an example like the above, I always want the packages to be resolved starting from the root directory and I think this is the correct behavior. This is also practically how npm does it since it moved to a flat dependency tree with v6 (with the exception if it is not possible to use a single version of a certain package). |
Thinking a little closer about it, the correct way would be that imports inside of a package do look for their "closest" I guess that would fix your problem. |
Hi @maoberlehner 👋 Yes, that's how the Node.js resolution algorithm works. Webpack uses the same algorithm to resolve module imports. import 'package'; first searches for a
If the resolution started at the root directory, it wouldn't be possible for a package to depend on a specific version of another package.
If
|
I have run into this, and reading the comments I think we all agree it should work like described in #188 (comment)? |
@maoberlehner are you still maintaining this package and would you be able to review and/or accept a PR? |
Quoting @jsnajdr's Automattic/wp-calypso#30933 (comment) (which is a succinct gist of my own observations):
The text was updated successfully, but these errors were encountered: