trails/apps/planner/vite.config.ts
Ullrich Schäfer 9a904d9f69
Sentry improvements: context, tracing, source maps, privacy manifest
- Set Sentry user context (id, username) in Journal root for all routes
- Tag Planner errors with session_id
- Use reactRouterV7BrowserTracingIntegration for route-aware traces
- Hidden source maps (no sourceMappingURL in bundles, .map deleted after
  upload to Sentry)
- Privacy manifest at /privacy documenting all data collection
- robots.txt blocking all bots on both apps
- Suppress i18next promotional console log

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 03:11:07 +01:00

32 lines
802 B
TypeScript

import { reactRouter } from "@react-router/dev/vite";
import { sentryVitePlugin } from "@sentry/vite-plugin";
import tailwindcss from "@tailwindcss/vite";
import { defineConfig } from "vite";
import path from "node:path";
import { yjsDevPlugin } from "./app/lib/vite-yjs-plugin.ts";
export default defineConfig({
build: {
sourcemap: "hidden",
},
plugins: [
tailwindcss(),
reactRouter(),
yjsDevPlugin(),
sentryVitePlugin({
org: "trails-qq",
project: "planner",
release: { name: process.env.SENTRY_RELEASE },
sourcemaps: { filesToDeleteAfterUpload: ["./build/**/*.map"] },
disable: !process.env.SENTRY_AUTH_TOKEN,
}),
],
resolve: {
alias: {
"~": path.resolve(__dirname, "./app"),
},
},
server: {
port: 3001,
},
});