Voeg Sentry-foutregistratie toe als gekozen logging-bestemming
Co-authored-by: Junie <junie@jetbrains.com>
This commit is contained in:
@@ -1,10 +1,16 @@
|
||||
import { StrictMode } from 'react';
|
||||
import { createRoot } from 'react-dom/client';
|
||||
import { RouterProvider } from '@tanstack/react-router';
|
||||
import * as Sentry from '@sentry/react';
|
||||
import './fonts';
|
||||
import './index.css';
|
||||
import { router } from './router';
|
||||
|
||||
const sentryDsn = import.meta.env.VITE_SENTRY_DSN;
|
||||
if (sentryDsn) {
|
||||
Sentry.init({ dsn: sentryDsn });
|
||||
}
|
||||
|
||||
const rootElement = document.getElementById('root');
|
||||
if (!rootElement) {
|
||||
throw new Error('Root element "#root" not found in index.html');
|
||||
|
||||
Reference in New Issue
Block a user