bottleneckcrm/frontend/src/hooks.client.js
Ashwin f6e453098b Refactor imports to use new aliasing convention and update environment variable handling
- 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.
2026-10-15 20:38:58 +05:30

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();