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
+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: {