chore(sentry): only load sentry when enabled
This commit is contained in:
parent
95ba8b8a11
commit
68a137acf9
@ -105,8 +105,7 @@ setLanguage(browserLanguage).then(() => {
|
|||||||
|
|
||||||
if (window.SENTRY_ENABLED) {
|
if (window.SENTRY_ENABLED) {
|
||||||
try {
|
try {
|
||||||
import {setupSentry} from './sentry'
|
import('./sentry').then(sentry => sentry.default(app, router))
|
||||||
setupSentry(app, router).then(sentry => sentry.default(app, router))
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error('Could not enable Sentry tracking', e)
|
console.error('Could not enable Sentry tracking', e)
|
||||||
}
|
}
|
||||||
|
@ -2,7 +2,7 @@ import 'virtual:vite-plugin-sentry/sentry-config'
|
|||||||
import type {App} from 'vue'
|
import type {App} from 'vue'
|
||||||
import type {Router} from 'vue-router'
|
import type {Router} from 'vue-router'
|
||||||
|
|
||||||
export async function setupSentry(app: App, router: Router) {
|
export default async function setupSentry(app: App, router: Router) {
|
||||||
const Sentry = await import('@sentry/vue')
|
const Sentry = await import('@sentry/vue')
|
||||||
const {Integrations} = await import('@sentry/tracing')
|
const {Integrations} = await import('@sentry/tracing')
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user