Stratal API Reference
    Preparing search index...

    Class LazyModuleLoader

    Loads modules on demand (NestJS-style), so optional features stay out of the cold-start path until first use.

    Inject DI_TOKENS.LazyModuleLoader and call load:

    const ref = await loader.load(() => import('./reports.module').then(m => m.ReportsModule))
    const reports = ref.get(ReportService)

    The loaded module's nested imports and providers are registered into the global container and its onInitialize hook runs once. Controllers, queue consumers, and cron jobs are skipped — that wiring is finalized at bootstrap. Repeat loads of the same module return the cached ModuleRef without re-registering.

    Index

    Constructors

    Methods

    Constructors

    Methods