-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Copy link
Labels
Package: nuxtIssues related to the Sentry Nuxt SDKIssues related to the Sentry Nuxt SDK
Description
Would be great if, within the
sentry.client.config.ts
file, we would able to use the runtime config:https://nuxt.com/docs/api/composables/use-runtime-config
Example from other module:
https://formkit.com/getting-started/installation#using-environment-variables-in-formkitconfigtsThe code below
import * as Sentry from '@sentry/nuxt' Sentry.init({ enabled: process.env.NUXT_PUBLIC_SENTRY_ENABLED, })Would then become:
import * as Sentry from '@sentry/nuxt' export default defineSentryConfig(() => { const config = useRuntimeConfig() Sentry.init({ enabled: config.public.sentry.enabled, }) })
TheAlexLichter, rjgx4, max-arias, febalist, AnthonyRuelle and 1 more
Metadata
Metadata
Assignees
Labels
Package: nuxtIssues related to the Sentry Nuxt SDKIssues related to the Sentry Nuxt SDK
Type
Projects
Status
Waiting for: Product Owner