Skip to content

Commit f72b9b1

Browse files
authored
Update Vite to version 8 (#1651)
Migrate from Vite 7 to Vite 8, which replaces esbuild + Rollup with Rolldown + Oxc for bundling, transforms, and minification. Dependency changes: - vite 7.3.1 → 8.0.8 - @vitejs/plugin-react 5.1.4 → 6.0.1 - @tailwindcss/vite 4.2.1 → 4.2.2 - babel-plugin-react-compiler 19.1.0-rc.3 → 1.0.0 - vitest / @vitest/coverage-v8 4.0.18 → 4.1.4 - Add @rolldown/plugin-babel 0.2.2 - Remove vite-tsconfig-paths (now built-in) Config changes: - Replace vite-tsconfig-paths plugin with resolve.tsconfigPaths: true - Move React Compiler to separate @rolldown/plugin-babel plugin with reactCompilerPreset, since @vitejs/plugin-react v6 removed built-in Babel support - Remove unnecessary /// <reference types="vitest" /> directive Resolves #1647
1 parent e410073 commit f72b9b1

File tree

6 files changed

+461
-556
lines changed

6 files changed

+461
-556
lines changed

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@
4545
"@eslint/compat": "^2.0.3",
4646
"@eslint/js": "^10.0.1",
4747
"@tanstack/eslint-plugin-query": "5.96.2",
48-
"@vitest/coverage-v8": "4.0.18",
49-
"babel-plugin-react-compiler": "19.1.0-rc.3",
48+
"@vitest/coverage-v8": "4.1.4",
49+
"babel-plugin-react-compiler": "^1.0.0",
5050
"eslint": "^10.0.3",
5151
"eslint-config-prettier": "^10.1.8",
5252
"eslint-plugin-perfectionist": "^5.6.0",
@@ -59,7 +59,7 @@
5959
"prettier-plugin-tailwindcss": "^0.7.2",
6060
"typescript": "^5.9.3",
6161
"typescript-eslint": "^8.57.0",
62-
"vitest": "4.0.18"
62+
"vitest": "4.1.4"
6363
},
6464
"lint-staged": {
6565
"!(**/*.{js,ts,tsx})": "prettier --ignore-unknown --write",

packages/graph-explorer-proxy-server/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,10 @@
3838
"@types/express": "^5.0.6",
3939
"@types/node": "^24.10.9",
4040
"@types/supertest": "^7.2.0",
41-
"@vitest/coverage-v8": "4.0.18",
41+
"@vitest/coverage-v8": "4.1.4",
4242
"rimraf": "^6.1.3",
4343
"supertest": "^7.2.2",
4444
"tsx": "^4.21.0",
45-
"vitest": "4.0.18"
45+
"vitest": "4.1.4"
4646
}
4747
}

packages/graph-explorer/package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"@monaco-editor/react": "^4.7.0",
2222
"@react-aria/textfield": "3.18.5",
2323
"@tanstack/react-query": "^5.90.21",
24-
"babel-plugin-react-compiler": "19.1.0-rc.3",
24+
"babel-plugin-react-compiler": "^1.0.0",
2525
"clsx": "^2.1.1",
2626
"color": "^5.0.3",
2727
"crypto-js": "^4.2.0",
@@ -76,7 +76,8 @@
7676
"@react-types/radio": "^3.9.4",
7777
"@react-types/shared": "^3.33.1",
7878
"@react-types/switch": "^3.5.17",
79-
"@tailwindcss/vite": "^4.2.1",
79+
"@rolldown/plugin-babel": "0.2.2",
80+
"@tailwindcss/vite": "^4.2.2",
8081
"@tanstack/react-query-devtools": "^5.91.3",
8182
"@testing-library/dom": "^10.4.1",
8283
"@testing-library/jest-dom": "^6.9.1",
@@ -94,8 +95,8 @@
9495
"@types/react-table": "^7.7.20",
9596
"@types/react-transition-group": "^4.4.12",
9697
"@types/wicg-file-system-access": "^2023.10.7",
97-
"@vitejs/plugin-react": "^5.1.4",
98-
"@vitest/coverage-v8": "4.0.18",
98+
"@vitejs/plugin-react": "^6.0.0",
99+
"@vitest/coverage-v8": "4.1.4",
99100
"core-js": "^3.48.0",
100101
"happy-dom": "^20.8.9",
101102
"jsdom": "^27.4.0",
@@ -104,9 +105,8 @@
104105
"tailwindcss": "^4.2.1",
105106
"tw-animate-css": "^1.4.0",
106107
"type-fest": "^5.4.4",
107-
"vite": "^7.3.1",
108-
"vite-tsconfig-paths": "^6.1.1",
109-
"vitest": "4.0.18"
108+
"vite": "^8.0.8",
109+
"vitest": "4.1.4"
110110
},
111111
"lint-staged": {
112112
"*.{ts,tsx}": [

packages/graph-explorer/vite.config.ts

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
/// <reference types="vitest" />
2-
import react from "@vitejs/plugin-react";
3-
import tsconfigPaths from "vite-tsconfig-paths";
1+
import react, { reactCompilerPreset } from "@vitejs/plugin-react";
2+
import babel from "@rolldown/plugin-babel";
43
import tailwindcss from "@tailwindcss/vite";
54
import { loadEnv, type PluginOption } from "vite";
65
import { coverageConfigDefaults, defineConfig } from "vitest/config";
@@ -56,22 +55,16 @@ export default defineConfig(({ mode }) => {
5655
__GRAPH_EXP_VERSION__: JSON.stringify(process.env.npm_package_version),
5756
},
5857
plugins: [
59-
tsconfigPaths(),
6058
htmlPlugin(),
6159
tailwindcss(),
62-
react({
63-
babel: {
64-
plugins: [
65-
[
66-
"babel-plugin-react-compiler",
67-
{
68-
target: "19", // '17' | '18' | '19'
69-
},
70-
],
71-
],
72-
},
60+
react(),
61+
babel({
62+
presets: [reactCompilerPreset()],
7363
}),
7464
],
65+
resolve: {
66+
tsconfigPaths: true,
67+
},
7568
test: {
7669
environment: "happy-dom",
7770
globals: true,

packages/shared/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
"./utils/testing": "./src/utils/testing/index.ts"
1313
},
1414
"devDependencies": {
15-
"@vitest/coverage-v8": "4.0.18",
15+
"@vitest/coverage-v8": "4.1.4",
1616
"rimraf": "^6.1.3",
17-
"vitest": "4.0.18"
17+
"vitest": "4.1.4"
1818
}
1919
}

0 commit comments

Comments
 (0)