I have a directory structure like so:
lib/assets/thing/index.ts
lib/assets/thing/stuff/A.svelte
lib/assets/thing/stuff/B.svelte
lib/assets/thing/stuff/C.svelte
lib/assets/thing/stuff/D.svelte
One of these thing/stuff
files is just a normal component with markup.
In index.ts
i have:
export { default as A } from './stuff/A.svelte';export { default as B } from './stuff/B.svelte';export { default as C } from './stuff/C.svelte';export { default as D } from './stuff/D.svelte';
This way from elsewhere I can import like:
import { A, B, C, D } from '$lib/assets/thing';
rather than:
import A from '$lib/assets/thing/stuff/A.svelte';import B from '$lib/assets/thing/stuff/B.svelte';// .etc
The only issue is that VSCode intellisense will show 2 results when auto-completing A
, one from $lib/assets/thing
and one from $lib/assets/thing/stuff/A.svelte
. Without resorting to a vscode setting like typescript.preferences.autoImportFileExcludePatterns
, is there a way to structure my asset folder to avoid the suggestion in the thing/stuff
folder?