CSS - Search in parent folders for node module resolution - #81555
Conversation
|
Pine (@octref) Martin Aeschlimann (@aeschli) is there anything holding up merging this PR? Any more I can do? |
|
Daniel Imms (@Tyriar) any more I can do to get this in to a release? |
|
Alasdair McLeay (@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 |
|
Alasdair McLeay (@penx) Sorry for the wait. |
3875853 to
237c803
Compare
|
Martin Aeschlimann (@aeschli) no worries, I've added a test and reordered commits to show test fail then pass |
…ort-parent-folders
|
Thanks Alasdair McLeay (@penx)! |
Replaces my previous PR #79651 by implementing recommendations from Pine (@octref) on #78894 .
Further to #70693 which was reworked by Martin Aeschlimann (@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
resolvePathToModuleso that it looks in parent folders for the existence ofnode_modules/module-nameall the way up to the workspace root, following node module resolution.Alternative approaches were raised in #79651 and this approach was preferred by Pine (@octref) in #78894 (comment).