feat: upgrade to vite 8 stable

This commit is contained in:
Aarnav Tale
2026-03-17 13:41:47 -04:00
parent 5f81822366
commit cc5aa99046
3 changed files with 276 additions and 723 deletions
+11 -4
View File
@@ -87,8 +87,7 @@
"testcontainers": "^11.12.0",
"tsx": "^4.21.0",
"typescript": "^5.9.3",
"vite": "8.0.0-beta.0",
"vite-tsconfig-paths": "^6.0.4",
"vite": "^8.0.0",
"vitepress": "next",
"vitest": "^4.0.18"
},
@@ -110,11 +109,19 @@
},
"onlyBuiltDependencies": [
"@tailwindcss/oxide",
"bufferutil",
"cpu-features",
"esbuild",
"lefthook"
"lefthook",
"protobufjs",
"ssh2",
"utf-8-validate"
],
"patchedDependencies": {
"react-router-hono-server": "patches/react-router-hono-server.patch"
}
},
"ignoredBuiltDependencies": [
"better-sqlite3"
]
}
}
+260 -711
View File
File diff suppressed because it is too large Load Diff
+5 -8
View File
@@ -5,7 +5,6 @@ import { reactRouter } from "@react-router/dev/vite";
import tailwindcss from "@tailwindcss/vite";
import { reactRouterHonoServer } from "react-router-hono-server/dev";
import { defineConfig } from "vite";
import tsconfigPaths from "vite-tsconfig-paths";
import { parse } from "yaml";
const prefix = process.env.__INTERNAL_PREFIX || "/admin";
@@ -42,28 +41,26 @@ const { server } = parse(config);
export default defineConfig(({ command, isSsrBuild }) => ({
base: command === "build" ? `${prefix}/` : undefined,
plugins: [reactRouterHonoServer(), reactRouter(), tailwindcss(), tsconfigPaths()],
plugins: [reactRouterHonoServer(), reactRouter(), tailwindcss()],
server: {
host: server.host,
port: server.port,
},
resolve: {
tsconfigPaths: true,
},
build: {
target: "esnext",
target: "baseline-widely-available",
sourcemap: true,
rolldownOptions:
command === "build"
? {
// Exclude WASM from the client since it fetches from the server
external: isSsrBuild ? [] : [/\.wasm(\?url)?$/],
output: {
manualChunks: undefined,
inlineDynamicImports: isSsrBuild,
},
}
: undefined,
},
ssr: {
target: "node",
noExternal: command === "build" ? true : undefined,
},
define: {