feat(sentry): only load sentry when it's enabled
This commit is contained in:
parent
653415e764
commit
96c9407414
12
src/main.ts
12
src/main.ts
@ -4,7 +4,6 @@ import {createApp} from 'vue'
|
|||||||
import pinia from './pinia'
|
import pinia from './pinia'
|
||||||
import router from './router'
|
import router from './router'
|
||||||
import App from './App.vue'
|
import App from './App.vue'
|
||||||
import {setupSentry} from './sentry'
|
|
||||||
import {error, success} from './message'
|
import {error, success} from './message'
|
||||||
import {VERSION} from './version.json'
|
import {VERSION} from './version.json'
|
||||||
|
|
||||||
@ -105,12 +104,13 @@ setLanguage(browserLanguage).then(() => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (window.SENTRY_ENABLED) {
|
if (window.SENTRY_ENABLED) {
|
||||||
try{
|
try {
|
||||||
setupSentry(app, router)
|
import {setupSentry} from './sentry'
|
||||||
} catch(e) {
|
setupSentry(app, router).then(sentry => sentry.default(app, router))
|
||||||
console.error('Could not enable Sentry tracking', e)
|
} catch (e) {
|
||||||
|
console.error('Could not enable Sentry tracking', e)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
app.use(pinia)
|
app.use(pinia)
|
||||||
app.use(router)
|
app.use(router)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user