Dynamic Modules — Fundamentals · NestJS

Make a module configurable by its importer with a static register() that returns a DynamicModule, and import a module built by ConfigurableModuleBuilder with options and a global flag.

What you will learn

Read the theory for Dynamic Modules

All Fundamentals lessons

All NestJS courses

loading types…

What you'll learn

  • Write a static register() that returns a DynamicModule with the importer's options as a provider
  • Import a dynamic module with options, and tell register(), forRoot() and forFeature() apart
  • Read a module built with ConfigurableModuleBuilder, and use setExtras options such as isGlobal