From fb4eb246710bd11d1605a0f5ff70214928419ad3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Zasso?= Date: Fri, 13 Mar 2026 14:36:11 +0100 Subject: [PATCH] chore: update Vite to version 8 --- package.json | 9 ++++----- vite.config.ts | 27 ++++++++------------------- 2 files changed, 12 insertions(+), 24 deletions(-) diff --git a/package.json b/package.json index 912d0c84c6..50ae6a1caf 100644 --- a/package.json +++ b/package.json @@ -139,8 +139,8 @@ "@types/react": "^18.3.13", "@types/react-dom": "^18.3.1", "@types/react-table": "^7.7.20", - "@vitejs/plugin-react": "^5.1.4", - "@vitest/coverage-v8": "^4.0.18", + "@vitejs/plugin-react": "^6.0.1", + "@vitest/coverage-v8": "^4.1.0", "@zakodium/tsconfig": "^1.0.2", "cross-env": "^10.1.0", "cspell": "^9.7.0", @@ -157,13 +157,12 @@ "react-dom": "^18.3.1", "react-router-dom": "^7.13.1", "rimraf": "^6.1.3", - "rollup-plugin-analyzer": "^4.0.0", "serve": "^14.2.6", "stylelint": "^17.4.0", "stylelint-config-standard": "^40.0.0", "typescript": "~5.9.3", - "vite": "^7.3.1", - "vitest": "^4.0.18" + "vite": "^8.0.0", + "vitest": "^4.1.0" }, "volta": { "node": "24.13.1" diff --git a/vite.config.ts b/vite.config.ts index c10f170ff2..f3e30f1126 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -2,7 +2,6 @@ import fs from 'node:fs'; import path from 'node:path'; import react from '@vitejs/plugin-react'; -import analyze from 'rollup-plugin-analyzer'; import type { AliasOptions } from 'vite'; import { defaultClientConditions, defaultServerConditions } from 'vite'; import { defineConfig } from 'vitest/config'; @@ -21,30 +20,20 @@ export default () => { return defineConfig({ base: './', - esbuild: { - jsx: 'automatic', - sourcemap: 'inline', - }, + oxc: {}, build: { sourcemap: 'inline', - rollupOptions: { - // @ts-expect-error analyzer types are wrong. - plugins: process.env.ANALYZE ? [analyze()] : [], + rolldownOptions: { output: { - manualChunks(id) { - if (id.includes('node_modules/openchemlib/')) { - return 'openchemlib'; - } - - if (id.includes('node_modules')) { - return 'vendor'; - } - - return undefined; + codeSplitting: { + groups: [ + { name: 'openchemlib', test: 'node_modules/openchemlib/' }, + { name: 'vendor', test: 'node_modules/' }, + ], }, }, }, - minify: process.env.NO_MINIFY ? false : 'esbuild', + minify: process.env.NO_MINIFY ? false : 'oxc', }, plugins: [react()], resolve: {