Google analytics integration.
Sentry.io integration. Vince integration. Region-scoped consent (denied-by-default in EU/EEA/UK/CH, granted elsewhere, DPDP-friendly notice)
This commit is contained in:
@@ -3,6 +3,14 @@ import { defineConfig } from "vite";
|
||||
import { tanstackStart } from "@tanstack/react-start/plugin/vite";
|
||||
import viteReact from "@vitejs/plugin-react";
|
||||
import tailwindcss from "@tailwindcss/vite";
|
||||
import { sentryTanstackStart } from "@sentry/tanstackstart-react/vite";
|
||||
|
||||
/**
|
||||
* Sentry build-time integration (sourcemap generation + upload) only runs
|
||||
* when SENTRY_AUTH_TOKEN is present — local and CI builds without
|
||||
* credentials are completely unaffected.
|
||||
*/
|
||||
const sentryUpload = Boolean(process.env.SENTRY_AUTH_TOKEN);
|
||||
|
||||
export default defineConfig({
|
||||
server: {
|
||||
@@ -11,6 +19,7 @@ export default defineConfig({
|
||||
resolve: {
|
||||
tsconfigPaths: true,
|
||||
},
|
||||
...(sentryUpload ? { build: { sourcemap: true } } : {}),
|
||||
plugins: [
|
||||
tailwindcss(),
|
||||
tanstackStart({
|
||||
@@ -21,5 +30,12 @@ export default defineConfig({
|
||||
},
|
||||
}),
|
||||
viteReact(),
|
||||
...(sentryUpload
|
||||
? [
|
||||
sentryTanstackStart({
|
||||
sourcemaps: { filesToDeleteAfterUpload: ["dist/**/*.map"] },
|
||||
}),
|
||||
]
|
||||
: []),
|
||||
],
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user