forked from vikunja/frontend
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) {
|
||||
try {
|
||||
import {setupSentry} from './sentry'
|
||||
setupSentry(app, router).then(sentry => sentry.default(app, router))
|
||||
import('./sentry').then(sentry => sentry.default(app, router))
|
||||
} catch (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 {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 {Integrations} = await import('@sentry/tracing')
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user