-
-
Notifications
You must be signed in to change notification settings - Fork 223
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
When a Svelte component is re-exported from an index.ts file, VSCode auto-import shows two suggestions for the same symbol:
one from the .svelte file itself, and one from the barrel export (index.ts).
This creates confusion and inconsistent import paths across the codebase.
Reproduction
- Create a folder structure:
src/
entities/
user/
ui/
UserAvatar.svelte
index.ts- In
entities/user/index.ts:
export { default as UserAvatar } from './ui/UserAvatar.svelte';- In another file (e.g.
src/pages/Home.svelte), try to import the component:
<script lang="ts">
import { UserAvatar } from ...
</script>- Observe that VSCode offers two auto-import suggestions:
entities/userentities/user/ui/UserAvatar.svelte
Expected behaviour
Only one suggestion should appear — ideally the barrel export (entities/user) since it’s a valid re-export of the component.
System Info
vscode
Version: 1.106.0 (Universal)
Commit: ac4cbdf48759c7d8c3eb91ffe6bb04316e263c57
Date: 2025-11-11T16:02:25.943Z (1 day ago)
Electron: 37.7.0
ElectronBuildId: 12597478
Chromium: 138.0.7204.251
Node.js: 22.20.0
V8: 13.8.258.32-electron.0
OS: Darwin arm64 25.1.0
extension
Identifier: svelte.svelte-vscode
Version: 109.12.0
package.json, tsconfig, etc...
used from template https://github.com/vitejs/vite/tree/main/packages/create-vite/template-svelte-ts
Which package is the issue about?
No response
Additional Information, eg. Screenshots
Screen.Recording.2025-11-13.at.11.43.42.mov
brubanov and nikdorbaz
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working