Skip to content
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

Support subfolder intellisense for scoped npm packages #55

Open
nachocodoner opened this issue Feb 10, 2018 · 1 comment
Open

Support subfolder intellisense for scoped npm packages #55

nachocodoner opened this issue Feb 10, 2018 · 1 comment

Comments

@nachocodoner
Copy link

nachocodoner commented Feb 10, 2018

I have been testing the extension, concretely the experimental feature of npm subfolder intellisense, which works greats. However, when having scoped packages, such as @scope/package-name, it doesn't work.

I have been diving into the code and I have seen that the scoped scenario is not covered, the plugin always split from the first slash it finds, check out here.

Probably we just need to do something like:

const scopedPkg = /(@\w*\/\w*)\/?(.*)/g.exec(pkgFragment);
const pkgFragmentSplit = scopedPkg ? scopedPkg.slice(1, 3) : pkgFragment.split('/');
const packageName: string = pkgFragmentSplit[0];

I have tried to change that in a fork, but I am not experienced to debug a vscode extension yet. So I thought that you may provide this fix quicker, it may affect to other parts as well.

Thank you!

@RusinovAnton
Copy link

Need this and ready to help. Could someone help with info on testing extensions from the fork/local package?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants