Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(feat) Use fewer Webpack chunks #162

Merged
merged 2 commits into from
Nov 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions packages/esm-home-app/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ import { registerBreadcrumbs, defineConfigSchema, getAsyncLifecycle, getSyncLife
import { createDashboardLink } from './createDashboardLink.component';
import { dashboardMeta } from './dashboard.meta';
import { esmHomeSchema } from './openmrs-esm-home-schema';
import rootComponent from './root.component';
import homeNavMenuComponent from './side-menu/side-menu.component';
import homeWidgetDashboardComponent from './home-page-widgets/home-page-widgets.component';

const moduleName = '@openmrs/esm-home-app';
const pageName = 'home';
Expand All @@ -13,16 +16,13 @@ const options = {

export const importTranslation = require.context('../translations', true, /.json$/, 'lazy');

export const root = getAsyncLifecycle(() => import('./root.component'), options);
export const root = getSyncLifecycle(rootComponent, options);

export const homeNavMenu = getAsyncLifecycle(() => import('./side-menu/side-menu.component'), options);
export const homeNavMenu = getSyncLifecycle(homeNavMenuComponent, options);

export const homeWidgetDbLink = getSyncLifecycle(createDashboardLink(dashboardMeta), options);

export const homeWidgetDashboard = getAsyncLifecycle(
() => import('./home-page-widgets/home-page-widgets.component'),
options,
);
export const homeWidgetDashboard = getSyncLifecycle(homeWidgetDashboardComponent, options);

export function startupApp() {
defineConfigSchema(moduleName, esmHomeSchema);
Expand Down
Loading
Loading