mirror of
https://github.com/ahmadk953/tasko.git
synced 2025-01-31 00:53:37 +00:00
21 lines
547 B
TypeScript
21 lines
547 B
TypeScript
import * as Sentry from '@sentry/nextjs';
|
|
|
|
export async function register() {
|
|
if (process.env.NEXT_RUNTIME === 'nodejs') {
|
|
await import('./sentry.server.config');
|
|
|
|
const { registerInitialCache } = await import(
|
|
'@neshca/cache-handler/instrumentation'
|
|
);
|
|
|
|
const CacheHandler = (await import('./cache-handler')).default;
|
|
|
|
await registerInitialCache(CacheHandler);
|
|
}
|
|
|
|
if (process.env.NEXT_RUNTIME === 'edge') {
|
|
await import('./sentry.edge.config');
|
|
}
|
|
}
|
|
|
|
export const onRequestError = Sentry.captureRequestError;
|