env
All checks were successful
Build & Deploy KLZ Cables / build-and-deploy (push) Successful in 3m52s
All checks were successful
Build & Deploy KLZ Cables / build-and-deploy (push) Successful in 3m52s
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
import * as Sentry from '@sentry/nextjs';
|
||||
import { getServerAppServices } from '@/lib/services/create-services.server';
|
||||
|
||||
/**
|
||||
* Next.js will call this on boot for the active runtime.
|
||||
@@ -9,13 +8,13 @@ import { getServerAppServices } from '@/lib/services/create-services.server';
|
||||
* - 'edge' when running in the Edge runtime (e.g. Middleware, Edge API Routes)
|
||||
*/
|
||||
export async function register() {
|
||||
// Initialize server services on boot
|
||||
if (process.env.NEXT_RUNTIME === 'nodejs') {
|
||||
getServerAppServices();
|
||||
}
|
||||
|
||||
if (process.env.NEXT_RUNTIME === 'nodejs') {
|
||||
await import('./sentry.server.config');
|
||||
|
||||
// Initialize server services on boot
|
||||
// We do this AFTER Sentry to ensure errors during service init are caught
|
||||
const { getServerAppServices } = await import('@/lib/services/create-services.server');
|
||||
getServerAppServices();
|
||||
}
|
||||
|
||||
if (process.env.NEXT_RUNTIME === 'edge') {
|
||||
|
||||
Reference in New Issue
Block a user