Closed jaens closed 2 months ago
Experiencing the same issue. I'm also looking for a project with working Vite+React+@vitejs/plugin-react-swc so that I can copy the version numbers. I have tried overwriting plugin-react-swc to use @swc/core 1.3.105 (using package.json overrides
), but the error remained, so I guess the error is coming from somewhere else.
@vitejs/plugin-react-swc v3.5.0 still works with current version of Vite (v5.1.1) , so pinning that version is a workaround, for now.
This is currently working for me:
{
"type": "module",
"devDependencies": {
"@swc-jotai/react-refresh": "0.1.0",
"@tsconfig/vite-react": "3.0.0",
"@types/node": "20",
"@types/react": "18.2",
"@types/react-dom": "18.2",
"@vitejs/plugin-react-swc": "3.5.0",
"typescript": "5.3.3",
"vite": "5.1.2"
},
"overrides": {
"@swc/core": "1.3.105"
}
}
I expect this to be a @vitejs/plugin-react-swc
issue, but feel free to reopen if it persists with latest versions.
After
@vitejs/plugin-react-swc
changed their version to 3.6.0 (which, I assume, contains an swc upgrade), every compilation fails with:Might be related to #22.