feat: import sentry only if it is enabled
continuous-integration/drone/pr Build is passing Details

This commit is contained in:
kolaente 2021-10-21 22:02:38 +02:00 committed by Dominik Pschenitschni
parent a4f4f2f344
commit d1d8c8274c
Signed by: dpschen
GPG Key ID: B257AC0149F43A77
2 changed files with 3 additions and 7 deletions

View File

@ -127,9 +127,9 @@ app.config.globalProperties.$message = {
success,
}
import setupSentry from './sentry'
setupSentry(app, router)
if (window.SENTRY_ENABLED) {
import('./sentry').then(sentry => sentry.default(app, router))
}
app.use(router)
app.use(store)

View File

@ -1,8 +1,4 @@
export default async function setupSentry(app, router) {
if (!window.SENTRY_ENABLED) {
return
}
const Sentry = await import('@sentry/vue')
const {Integrations} = await import('@sentry/tracing')