- Changed imports from '$lib' to '#lib' for consistency across the codebase. - Updated environment variable imports to use the new structure from '$app/env/public' and '$app/env/private'. - Removed deprecated svelte.config.js and adjusted vite.config.js to accommodate new configurations. - Added stubs for environment variables in tests to ensure compatibility with the new import structure.
16 lines
431 B
JavaScript
16 lines
431 B
JavaScript
import { handleErrorWithSentry, replayIntegration } from '@sentry/sveltekit';
|
|
import * as Sentry from '@sentry/sveltekit';
|
|
import * as env from '$app/env/public';
|
|
|
|
const dsn = env.PUBLIC_SENTRY_DSN || '';
|
|
|
|
Sentry.init({
|
|
dsn,
|
|
enabled: !!dsn,
|
|
tracesSampleRate: 1.0,
|
|
replaysSessionSampleRate: 0.1,
|
|
replaysOnErrorSampleRate: 1.0,
|
|
integrations: [replayIntegration()]
|
|
});
|
|
|
|
export const handleError = handleErrorWithSentry();
|