Skip to content

Commit

Permalink
chore: conditionally enable Sentry integration based on environment v…
Browse files Browse the repository at this point in the history
…ariable

Conditionally enables Sentry integration only if the SENTRY_DSN environment variable is set, improving build efficiency and reducing unnecessary dependencies.
  • Loading branch information
ccbikai committed Sep 18, 2024
1 parent fa703f7 commit dac74bc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export default defineConfig({
output: 'hybrid',
adapter: providers[adapterProvider] || providers.node,
integrations: [
...process.env.SENTRY_DSN
...(process.env.SENTRY_DSN
? [
sentry({
enabled: {
Expand All @@ -44,7 +44,7 @@ export default defineConfig({
},
}),
]
: [],
: []),
],
vite: {
ssr: {
Expand Down

0 comments on commit dac74bc

Please sign in to comment.