From 38d3abc3041034953eb7ca29a3327dc74b79b209 Mon Sep 17 00:00:00 2001 From: Dennis Kigen Date: Tue, 14 Nov 2023 20:48:00 +0300 Subject: [PATCH] (feat) Synchronously load extensions and pages (#68) --- src/index.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/index.ts b/src/index.ts index 9f3e4da..68b2792 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,4 +1,7 @@ -import { getAsyncLifecycle } from "@openmrs/esm-framework"; +import { getSyncLifecycle } from "@openmrs/esm-framework"; + +import cohortBuilderComponent from "./cohort-builder"; +import cohortBuilderAdminPageCardLinkComponent from "./cohort-builder-admin-link.component"; const moduleName = "@openmrs/esm-cohort-builder"; @@ -16,12 +19,9 @@ export const importTranslation = require.context( export function startupApp() {} -export const cohortBuilder = getAsyncLifecycle( - () => import("./cohort-builder"), - options -); +export const cohortBuilder = getSyncLifecycle(cohortBuilderComponent, options); -export const cohortBuilderAdminPageCardLink = getAsyncLifecycle( - () => import("./cohort-builder-admin-link.component"), +export const cohortBuilderAdminPageCardLink = getSyncLifecycle( + cohortBuilderAdminPageCardLinkComponent, options );