- Disable Sentry Vite plugin telemetry (telemetry: false) - Pass SENTRY_RELEASE as build-arg (not secret) since it's just the git sha - Keep only SENTRY_AUTH_TOKEN as Docker secret The release version was showing as *** because Docker secrets get masked by GitHub Actions. Git sha is not sensitive — safe as a build arg. The sourcemap warning from react-router is a known upstream issue (ships without sourcemaps) and is harmless. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
31 lines
745 B
TypeScript
31 lines
745 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";
|
|
|
|
export default defineConfig({
|
|
build: {
|
|
sourcemap: "hidden",
|
|
},
|
|
plugins: [
|
|
tailwindcss(),
|
|
reactRouter(),
|
|
sentryVitePlugin({
|
|
org: "trails-qq",
|
|
project: "journal",
|
|
release: { name: process.env.SENTRY_RELEASE },
|
|
sourcemaps: { filesToDeleteAfterUpload: ["./build/**/*.map"] },
|
|
disable: !process.env.SENTRY_AUTH_TOKEN,
|
|
telemetry: false,
|
|
}),
|
|
],
|
|
resolve: {
|
|
alias: {
|
|
"~": path.resolve(__dirname, "./app"),
|
|
},
|
|
},
|
|
server: {
|
|
port: 3000,
|
|
},
|
|
});
|