anacierdem / vscode-requirejs

Provides goto definition functionality for require js modules.
MIT License
21 stars 14 forks source link

Relative dependency in the parent dir not working #64

Open xmedeko opened 4 years ago

xmedeko commented 4 years ago

The Require Module Support works well for the dojo AMD loading. It works even for relative path ./MyModule, but it fails for relative path to the parent dir ../MyModule - e.g. Ctrl + click does not work.

ptaczek commented 2 years ago

Hey there, this seems to be still an issue. Relative paths of dependencies are resolved AGAINST the modulePath from the extension config and therefore pointing to a non-existing file paths.

anacierdem commented 2 years ago

This extension should not even work, are you sure it works if the path is not a parent path? I highly doubt it at this point as it is targeting 3-4 years old vscode APIs

ptaczek commented 2 years ago

This extension should not even work, are you sure it works if the path is not a parent path? I highly doubt it at this point as it is targeting 3-4 years old vscode APIs

I am using it on newest VSCode and all I need is to be able to ctrl-click-through to the depemndence module. So I fixed it locally in the ReferenceProvider.js by adding also the '../' pattern to the relative path test and it works as I needed.

anacierdem commented 2 years ago

Interesting, that means there is still some hope for the extension :) I can give it another try if I can find the time