From ebfccf01ccc0bbb29344953c7bc830d0fb65a38f Mon Sep 17 00:00:00 2001 From: SeanCassiere <33615041+SeanCassiere@users.noreply.github.com> Date: Wed, 11 Sep 2024 22:56:19 +1200 Subject: [PATCH] chore: turn off sourcemaps during build --- vite.config.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vite.config.ts b/vite.config.ts index 9ebcf0ed..e91097c4 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -14,7 +14,7 @@ const commitHash = cp const APP_VERSION = `${packageJson.version}-${commitHash}`; // https://vitejs.dev/config/ -export default defineConfig(() => { +export default defineConfig(({ command }) => { return { plugins: [ TanStackRouterVite({ @@ -47,7 +47,7 @@ export default defineConfig(() => { port: 3000, }, build: { - sourcemap: true, + sourcemap: command === "serve", }, define: { "import.meta.env.APP_VERSION": JSON.stringify(APP_VERSION),