From 549432dab4dd7fa0eb4eebe229db10c850be11db Mon Sep 17 00:00:00 2001 From: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com> Date: Tue, 16 Apr 2024 16:16:00 +0200 Subject: [PATCH] let the app element load any bundles and only call the 'beforeInit' function on entrypoints --- src/Umbraco.Web.UI.Client/src/apps/app/app.element.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/apps/app/app.element.ts b/src/Umbraco.Web.UI.Client/src/apps/app/app.element.ts index e0902afa17..e38042a8b6 100644 --- a/src/Umbraco.Web.UI.Client/src/apps/app/app.element.ts +++ b/src/Umbraco.Web.UI.Client/src/apps/app/app.element.ts @@ -83,9 +83,10 @@ export class UmbAppElement extends UmbLitElement { OpenAPI.BASE = window.location.origin; - // Let bundles and entry points initialize before the application is initialized if they are global - new UmbBundleExtensionInitializer(this, umbExtensionsRegistry, 'global'); - new UmbEntryPointExtensionInitializer(this, umbExtensionsRegistry, 'global'); + new UmbBundleExtensionInitializer(this, umbExtensionsRegistry); + + // Initialise any entryPoints that export the 'beforeInit' function + new UmbEntryPointExtensionInitializer(this, umbExtensionsRegistry, 'beforeInit'); new UmbIconRegistry().attach(this); new UUIIconRegistryEssential().attach(this); @@ -107,7 +108,7 @@ export class UmbAppElement extends UmbLitElement { // Register Core extensions (this is specifically done here because we need these extensions to be registered before the application is initialized) onInit(this, umbExtensionsRegistry); - // Register public extensions + // Register public extensions (login extensions) await new UmbServerExtensionRegistrator(this, umbExtensionsRegistry).registerPublicExtensions(); // Try to initialise the auth flow and get the runtime status