Skip to content
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

VSCode does not detect vite-imagetools parameters #566

Closed
khromov opened this issue May 28, 2023 · 3 comments
Closed

VSCode does not detect vite-imagetools parameters #566

khromov opened this issue May 28, 2023 · 3 comments

Comments

@khromov
Copy link

khromov commented May 28, 2023

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?

@khromov khromov changed the title VSCode does not detect vite-imagetools shorthands VSCode does not detect vite-imagetools parameters May 28, 2023
@michaelmichael
Copy link

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

@khromov
Copy link
Author

khromov commented Aug 16, 2023

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

@JonasKruckenberg
Copy link
Owner

closing as duplicate of #160

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants