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

Volar adds ".js" extension when autoimporting components #3150

Closed
sheremet-va opened this issue May 9, 2023 · 1 comment
Closed

Volar adds ".js" extension when autoimporting components #3150

sheremet-va opened this issue May 9, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@sheremet-va
Copy link

Version: v1.7.0

When typescript.preferences.importModuleSpecifierEnding and javascript.preferences.importModuleSpecifierEnding is enabled (js), VSCode auto imports Vue components with .vue.js extension instead of just .vue (when typing component name in script or template blocks).

Reproduction: https://github.com/sheremet-va/volar-bug-extension

@sheremet-va
Copy link
Author

sheremet-va commented May 9, 2023

Another issue is that Volar uses .js extension when importing any file inside Vue components, but it keeps .ts extension when importing inside TypeScript file (this is allowed with allowImportingTsExtensions compiler option).

It should just keep an extension. "js" value in importModuleSpecifierEnding means "to use the file extension" as far as I understand.

This worked as expected in #2518

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants