feat: add vite-plugin sentry #1991

Merged
konrad merged 8 commits from dpschen/frontend:feature/feat-vite-plugin-sentry into main 2023-06-18 13:40:23 +00:00
2 changed files with 2 additions and 3 deletions
Showing only changes of commit 68a137acf9 - Show all commits

View File

@ -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)
}

View File

@ -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')