From b2f59df8d1213b84496e8da49fad73cb2f1a763f Mon Sep 17 00:00:00 2001 From: Nick Crews Date: Mon, 1 Dec 2025 19:58:12 -0700 Subject: [PATCH] Refactor Vite config to use defineConfig at top level This better restricts the type of `command`, and allows us to not define the types ourselves. --- vite.config.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vite.config.ts b/vite.config.ts index a769932..745aa2c 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -202,7 +202,7 @@ const buildConfig = ({ mode }: { mode: string }) => { }; // https://vitejs.dev/config/ -export default async ({ command, mode }: { command: string; mode: string }) => { +export default defineConfig(async ({ command, mode }) => { if (command === 'serve') { // for 'serve' mode, we only want to serve the client bundle locally return clientServeConfig(); @@ -212,4 +212,4 @@ export default async ({ command, mode }: { command: string; mode: string }) => { return buildConfig({ mode }); } return {}; -}; +});