yacd/src/misc/sentry.js
2019-08-29 22:04:57 +08:00

10 lines
301 B
JavaScript

const dsn = 'https://7068a15928ae45cf884dd8398fe8649c@sentry.io/1359284';
let Sentry;
export async function getSentry() {
if (Sentry) return Sentry;
const s = await import('@sentry/browser');
s.init({ dsn });
// eslint-disable-next-line require-atomic-updates
Sentry = s;
return Sentry;
}