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

Auto import rune files (.svelte.js/.svelte.ts) files with full extension. #2620

Open
brunnerh opened this issue Dec 6, 2024 · 1 comment
Labels
feature request New feature or request

Comments

@brunnerh
Copy link
Member

brunnerh commented Dec 6, 2024

Description

If a symbol from a .svelte.js file is selected from a suggestion dropdown in VS Code, the added import lacks the .js extension.

If the extension is missing, this can cause conflicts with components that share the prefix, it also is plain confusing to the uninitiated since it looks like a component is being imported.

Proposed solution

Always import as .svelte.js, not sure if this is possible though.

(Maybe use .svelte.ts if state of TS's allowImportingTsExtensions can be detected.)

Alternatives

No response

Additional Information, eg. Screenshots

No response

@dummdidumm
Copy link
Member

I'm not sure we can reliably do this because some tooling might want to resolve .svelte.js to actual .js files when there's a .ts file.

I believe there's a VS Code setting which makes it so the full file path is used, so it might also be solveable through that.

@dummdidumm dummdidumm added the feature request New feature or request label Jan 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants