From 14de550b56d0f31b9e4f43566deeb3090f3bce55 Mon Sep 17 00:00:00 2001 From: Kristiyan Tachev Date: Thu, 7 Mar 2024 16:38:57 +0200 Subject: [PATCH] fix(di): removed initialization of dependencies of type providers aka classes before initialization all services are lazy loaded --- packages/di/src/module/module.ts | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/packages/di/src/module/module.ts b/packages/di/src/module/module.ts index c8c8794..cd930ec 100644 --- a/packages/di/src/module/module.ts +++ b/packages/di/src/module/module.ts @@ -42,15 +42,10 @@ export const Module = ( const providers = (entries.providers || []) as WithProviders[]; const factories = filterNonNull(providers).filter(v => !!v.useFactory); - const services = filterNonNull(providers).filter(v => !v.useFactory); - + for (const entry of factories) { ProvidersMetadata.set(entry, entry); } - - for (const entry of services) { - set(entry); - } for (const entry of filterNonNull( (entries.bootstrap || []) as ObjectUnion[]