chore: conditionally enable Sentry integration based on environment variable

Conditionally enables Sentry integration only if the SENTRY_DSN environment variable is set, improving build efficiency and reducing unnecessary dependencies.
This commit is contained in:
ccbikai
2024-09-18 20:52:59 +08:00
parent fa703f7176
commit dac74bc9d8

View File

@@ -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: {
@@ -44,7 +44,7 @@ export default defineConfig({
},
}),
]
: [],
: []),
],
vite: {
ssr: {