build
All checks were successful
Build & Deploy KLZ Cables / build-and-deploy (push) Successful in 3m30s
All checks were successful
Build & Deploy KLZ Cables / build-and-deploy (push) Successful in 3m30s
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
import { AppServices } from './app-services';
|
||||
import { NoopAnalyticsService } from './analytics/noop-analytics-service';
|
||||
import { UmamiAnalyticsService } from './analytics/umami-analytics-service';
|
||||
import { MemoryCacheService } from './cache/memory-cache-service';
|
||||
import { GlitchtipErrorReportingService } from './errors/glitchtip-error-reporting-service';
|
||||
import { NoopErrorReportingService } from './errors/noop-error-reporting-service';
|
||||
@@ -75,8 +74,12 @@ export function getAppServices(): AppServices {
|
||||
const sentryServerEnabled = Boolean(process.env.SENTRY_DSN);
|
||||
|
||||
// Create analytics service (Umami or no-op)
|
||||
// Use dynamic import to avoid importing server-only code in client components
|
||||
const analytics = umamiEnabled
|
||||
? new UmamiAnalyticsService({ enabled: true })
|
||||
? (() => {
|
||||
const { UmamiAnalyticsService } = require('./analytics/umami-analytics-service');
|
||||
return new UmamiAnalyticsService({ enabled: true });
|
||||
})()
|
||||
: new NoopAnalyticsService();
|
||||
|
||||
// Create error reporting service (GlitchTip/Sentry or no-op)
|
||||
|
||||
Reference in New Issue
Block a user