Vite 6 + React Router 7 - Type PluginOption[] is not assignable to type PluginOption #7075
Answered
by
hi-ogawa
stevensacks
asked this question in
Q&A
-
React Router 7 works fine with Vite 6, but Vitest has a TS error in the editor. Running vitest works, but TypeScript is complaining. import react from '@vitejs/plugin-react';
import tsconfigPaths from 'vite-tsconfig-paths';
import {defineConfig} from 'vitest/config';
export default defineConfig({
plugins: [react(), tsconfigPaths()],
~~~~~. ~~~~~~~~~~~~~
TS2769: No overload matches this call.
The last overload gave the following error.
Type PluginOption[] is not assignable to type PluginOption I tried deleting node_modules and package-lock.json and reinstalling, and also tried running dedupe, but it didn't fix it. Here's the
Any ideas how to resolve? |
Beta Was this translation helpful? Give feedback.
Answered by
hi-ogawa
Dec 12, 2024
Replies: 1 comment
-
Vitest 2 doesn't allow Vite 6. You can try beta to use Vite 6 https://github.com/vitest-dev/vitest/releases/tag/v3.0.0-beta.2 |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
stevensacks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Vitest 2 doesn't allow Vite 6. You can try beta to use Vite 6 https://github.com/vitest-dev/vitest/releases/tag/v3.0.0-beta.2