vitejs / vite-plugin-react-swc

Speed up your Vite dev server with SWC
MIT License
830 stars 54 forks source link

Excessive Stack Depth TS error in vite.config.ts #181

Closed m4ttheweric closed 9 months ago

m4ttheweric commented 10 months ago

I have a pretty vanilla setup here using vite 5.0.5 and TS 5.3.2 node engine is at 20.10.0 and I am using bun as a package manager.

vite.config.ts:

import react from '@vitejs/plugin-react-swc';
import { defineConfig } from 'vite';

export default defineConfig({
  plugins: [react()],
});

The TS compiler in vscode, which I have using the TS version mentioned, is complaining about this:

Excessive stack depth comparing types '{ plugins: PluginOption[][]; }' and 'UserConfig'.ts(2321)

Screenshot 2023-12-04 at 10 27 01 AM

Any ideas on how to resolve this?

ArnaudBarre commented 10 months ago

This seems like an issue with multiple version of Vite installed in node_modules