-
-
Notifications
You must be signed in to change notification settings - Fork 223
Description
Describe the bug
I'm not really sure which repo I should post this issue in, so if this isn't the right place, please let me know.
In SvelteKit, you can of course import assets, stuff like .png, .jpg, or .svg files (there's an example of that in the official FAQ), and depending on the configuration, you could get the path to the file, or its contents (for example if you're using something like sveltekit-svg, by importing an SVG file you could get its content as a string).
This all works great, but the one issue that's been bothering me is that when you want to import, say an SVG file, VSCode's autocomplete doesn't show any of such files in its list of suggestions, while it does so for Svelte files or TS/JS files.
For instance, assuming you have a directory structure like so:
- src
- lib
- assets
- logo.svg
- avatar.png
- someTypeScriptFile.ts
- components
- MyComp.svelte
- routes
- ...
When you want to import say the logo.svg file from the assets folder, this is what VSCode's list of suggestions looks like:
As you can see none of the .png, .svg, etc. files appear in the list.
Why is that? Isn't there any way to make this work?
In addition to that, when you reference a non-existent file, you don't get any red squiggly or anything, which isn't nice:
Note that I'm also using TypeScript in the project.
Thanks in advance.
Severity
annoyance

