Skip to content

Commit 7b5b70f

Browse files
committed
chore(test): silence vite 8 deprecation warnings in the sim vitest config
@vitejs/plugin-react v4 targets pre-rolldown Vite: it sets `esbuild.jsx` and `optimizeDeps.rollupOptions`, both deprecated under Vite 8's oxc pipeline, and self-reports that plugin-react-oxc should be used instead. v6 is that plugin merged back under the original name — it requires Vite ^8, drops Babel entirely, and emits none of those options. Vite 8 also resolves tsconfig paths natively, so vite-tsconfig-paths is replaced by `resolve.tsconfigPaths`. Full apps/sim suite unchanged: 1483 passed / 2 skipped files, 20415 passed / 30 skipped tests.
1 parent 1bce1a4 commit 7b5b70f

3 files changed

Lines changed: 7 additions & 78 deletions

File tree

apps/sim/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -261,13 +261,12 @@
261261
"@types/react-dom": "^19",
262262
"@types/ssh2": "^1.15.5",
263263
"@types/three": "0.177.0",
264-
"@vitejs/plugin-react": "^4.3.4",
264+
"@vitejs/plugin-react": "^6.0.5",
265265
"@vitest/coverage-v8": "^4.1.0",
266266
"postcss": "^8",
267267
"react-email": "6.9.0",
268268
"tailwindcss": "^3.4.1",
269269
"typescript": "^7.0.2",
270-
"vite-tsconfig-paths": "^5.1.4",
271270
"vitest": "^4.1.0"
272271
}
273272
}

apps/sim/vitest.config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import path from 'path'
22
/// <reference types="vitest" />
33
import react from '@vitejs/plugin-react'
4-
import tsconfigPaths from 'vite-tsconfig-paths'
54
import { configDefaults, defineConfig } from 'vitest/config'
65

76
const nextEnv = require('@next/env')
@@ -11,7 +10,7 @@ const projectDir = process.cwd()
1110
loadEnvConfig(projectDir)
1211

1312
export default defineConfig({
14-
plugins: [react(), tsconfigPaths()],
13+
plugins: [react()],
1514
test: {
1615
globals: true,
1716
environment: 'node',
@@ -27,6 +26,7 @@ export default defineConfig({
2726
testTimeout: 10000,
2827
},
2928
resolve: {
29+
tsconfigPaths: true,
3030
alias: [
3131
{
3232
find: '@sim/db',

0 commit comments

Comments
 (0)