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-formkitconfigts
The 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,
})
})
Originally posted by @darthf1 in #9095
Originally posted by @darthf1 in #9095