Skip to content

Commit

Permalink
fix(di): removed initialization of dependencies of type providers aka…
Browse files Browse the repository at this point in the history
… classes before initialization all services are lazy loaded
  • Loading branch information
Stradivario committed Mar 7, 2024
1 parent 1627089 commit 14de550
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions packages/di/src/module/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,10 @@ export const Module = <T>(

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[]
Expand Down

0 comments on commit 14de550

Please sign in to comment.