-
Notifications
You must be signed in to change notification settings - Fork 29.7k
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
CSS - Search in parent folders for node module resolution #81555
CSS - Search in parent folders for node module resolution #81555
Conversation
@Tyriar any more I can do to get this in to a release? |
@penx I have nothing to do with this, I simply pushed it out as it didn't make it into the release. |
After rebasing off master, the above error is reported. Pretty sure this is unrelated to this PR and tests should be rerun |
@penx Sorry for the wait. |
3875853
to
237c803
Compare
…ort-parent-folders
Thanks @penx! |
Replaces my previous PR #79651 by implementing recommendations from @octref on #78894 .
Further to #70693 which was reworked by @aeschli in 8f72934 due to issues with require.resolve and webpack.
The current implementation for microsoft/vscode-css-languageservice#136 resolves the path to a CSS module but only looks for node_modules in the same folder as the CSS file, which for many use cases is not sufficient.
This PR updates
resolvePathToModule
so that it looks in parent folders for the existence ofnode_modules/module-name
all the way up to the workspace root, following node module resolution.Alternative approaches were raised in #79651 and this approach was preferred by @octref in #78894 (comment).