Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,9 @@ dist/
.dev.vars
.idea

# Local env files (e.g. VITE_SENTRY_DSN for production builds). Vite loads
# `.env.production.local` automatically; keep the DSN out of this public repo.
.env*.local

# macOS
.DS_Store
2 changes: 1 addition & 1 deletion src/router.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export function getRouter() {

if (!router.isServer) {
Sentry.init({
dsn: 'https://d1893624a683484f8260184a6025be0f@o4503970038611968.ingest.us.sentry.io/4503970040053760',
dsn: import.meta.env.VITE_SENTRY_DSN,
integrations: [],
});
}
Expand Down
2 changes: 1 addition & 1 deletion src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ async function handler(request: Request, env: Env, ctx: ExecutionContext): Promi

export default Sentry.withSentry(
() => ({
dsn: 'https://d1893624a683484f8260184a6025be0f@o4503970038611968.ingest.us.sentry.io/4503970040053760',
dsn: import.meta.env.VITE_SENTRY_DSN,
sendDefaultPii: false,
}),
// @ts-expect-error - TanStack's ServerEntry types fetch as (request, opts?), not (request, env, ctx)
Expand Down
4 changes: 4 additions & 0 deletions vite-env.d.ts
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
/// <reference types="vite/client" />

interface ImportMetaEnv {
readonly VITE_SENTRY_DSN?: string;
}