Ctrl/cmd+Click links to node_modules on imports/use only works in .scss files located at the same level as the node_modules folder, but it doesn't work if the scss is inside a nested folder. Consider this scenario:
project
├── node_modules
│ └── @scope
│ └── lib
│ └── index.scss
│
│
├── here-it-works.scss <---- at project root, when node_modules is located in the same folder
│ as the file, Ctrl+click will work
│
└── folder
└── here-it-doesnt.scss <-- one level deeper into the folder structure, it doesn't work anymore :(
// /here-it-works.scss
@use "@scope/lib"; // Ctrl+Click here will redirect you to node_modules/@scope/lib/index.scss
// /folder/here-it-doesnt-work.scss
@use "@scope/lib"; // Ctrl+Click will try to locate a file called
// "lib" in /folder/@scope/lib instead of
// looking into root-level node_modules
A screenrecored gif to further explain what I'm talking about (this was recorded on a clean vscode instance, without any extensions installed, by runing it with the --profile-temp flag):
Ctrl/cmd+Click links to
node_modules
onimports
/use
only works in .scss files located at the same level as the node_modules folder, but it doesn't work if the scss is inside a nested folder. Consider this scenario:A screenrecored gif to further explain what I'm talking about (this was recorded on a clean vscode instance, without any extensions installed, by runing it with the
--profile-temp
flag):