-
Notifications
You must be signed in to change notification settings - Fork 37
CompilingContainer
Mauro Gadaleta edited this page Jun 19, 2026
·
3 revisions
Compile the container to validate dependencies and optimize service resolution.
The service container can be compiled for various reasons. These reasons include checking for any potential issues such as circular references and making the container more efficient.
It is compiled by running:
import {ContainerBuilder, JsFileLoader} from 'node-dependency-injection'
let container = new ContainerBuilder()
// ...
await container.compile()After compiling the container the same container will be frozen and you cannot register more services.
Copyright © 2023-2024 Mauro Gadaleta