我刚刚创建了一个应用程序pnpx sv create sveltekit-test2
并检查了 vitest
现在当我运行时pnpm check
出现此错误:
Loading svelte-check in workspace: /home/sas/devel/apps/dgiit/proyectos/tmp/sveltekit-test
Getting Svelte diagnostics...
/home/sas/devel/apps/dgiit/proyectos/tmp/sveltekit-test/vite.config.ts:5:12
Error: No overload matches this call.
The last overload gave the following error.
这是我的 vite.config.js
import { defineConfig } from "vitest/config";
import { sveltekit } from '@sveltejs/kit/vite';
export default defineConfig({
plugins: [sveltekit()],
test: {
include: ['src/**/*.{test,spec}.{js,ts}']
}
});
vscode 上也出现了同样的错误
顺便说一下,包中defineConfig
的功能可以正常工作vite