-
-
Notifications
You must be signed in to change notification settings - Fork 196
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 is incorrect for grandparent #1653
Comments
This works as expected from the language-tools side of view. The Keeping this open as a reminder to try this out myself and provide a PR to the Vite repo. |
The setting would need an accompanying Vite alias, which sounds like too much for a minimal starter template Fixes sveltejs/language-tools#1653
Closing as the related PR in |
Thanks! |
Describe the bug
When the Svelte plugin auto-imports a component from the grandparent directory, the import it adds is incorrect:
Although this path looks correct, it causes a compiler error:
The expected import is:
Reproduction
npm create vite@latest
- select a framework: Svelte - select a variant: JavaScriptsrc/Bar.svelte
src/lib/foo/Foo.svelte
. Type<Ba
, and accept theBar
auto-completion + auto-import.→ The import is incorrect.
Foo
needs to be used somewhere. InApp.svelte
, import it and add a<Foo />
tag, then runnpm run build
.→ There is a compiler error due to the incorrect import.
Expected behaviour
The auto-import should be correct and should not produce a compiler error.
System Info
Which package is the issue about?
No response
Additional Information, eg. Screenshots
No response
The text was updated successfully, but these errors were encountered: