JonasKruckenberg / imagetools

Load and transform images using a toolbox :toolbox: of custom import directives!

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

VSCode does not detect vite-imagetools parameters

khromov opened this issue · comments

I have a SvelteKit project where I have added vite-imagetools like this in vite.config.ts:

import { sveltekit } from '@sveltejs/kit/vite';
import type { UserConfig } from 'vite';
import { imagetools } from 'vite-imagetools';

const config: UserConfig = {
	plugins: [
		imagetools(),
		sveltekit(),
	]
};

export default config;

Building the project works correctly, but VS Code complains as soon as I add a query param:

Screenshot 2023-05-28 at 19 45 10

The same issue shows if I add ?format=webp and also if I use direct paths (without $lib alias)

Is there some way to add the annotations to VS Code?

There are several strategies in #160 that should help you.

Thanks! I saw that there is also #532 on the same topic!

closing as duplicate of #160