Skip to content

Commit

Permalink
Fix issue where SourceMaps were not uploaded even though Sentry keys …
Browse files Browse the repository at this point in the history
…were correctly registered (#219)

* Add debugging line in `gh_pages.yaml`

* Change sentry enabling options

* Restore GitHubActions `gh_pages.yaml`
  • Loading branch information
devleejb authored Jun 27, 2024
1 parent d5fd7d9 commit 4cc0b8d
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions frontend/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,19 @@ import { sentryVitePlugin } from "@sentry/vite-plugin";
// https://vitejs.dev/config/
export default defineConfig({
build: {
sourcemap: true, // Source map generation must be turned on
// Source map generation must be turned on
// Only enable Sentry plugin if the environment variables are set
sourcemap: Boolean(
process.env.SENTRY_ORG && process.env.SENTRY_PROJECT && process.env.SENTRY_AUTH_TOKEN
),
},
plugins: [
react(),
version(),
// Only enable Sentry plugin if the environment variables are set
process.env.SENTRY_AUTH_TOKEN &&
sentryVitePlugin({
org: process.env.SENTRY_ORG,
project: process.env.SENTRY_PROJECT,
authToken: process.env.SENTRY_AUTH_TOKEN,
}),
sentryVitePlugin({
org: process.env.SENTRY_ORG,
project: process.env.SENTRY_PROJECT,
authToken: process.env.SENTRY_AUTH_TOKEN,
}),
],
});

0 comments on commit 4cc0b8d

Please sign in to comment.