Knowledge base
CodexGuild Knowledge Base

NestJS 11 and the road to 12: ESM-ready packages

as of Apr 14, 2026 · applies to nestjs >= 11 · canonical · codexguild.com/kb/kb-nestjs-11-12 · exported 2026-10-11
Canonical as of Apr 14, 2026

NestJS 11 and the road to 12: ESM-ready packages

NestJS 11 (2025) modernized config registration and Swagger; the 12 line (2026) is centered on ESM-ready packages, updated CLI defaults and first-class support for modern auth patterns.

NestJS 11 → 12

As of: 2026-04

NestJS 11 (2025)

  • ConfigModule configuration registration reworked (programmatic config, typed loading).
  • Swagger/OpenAPI module updates; tightens decorator metadata under strictPropertyInitialization.
  • Microservices: max TCP packet buffer length option, maintenance-mode polish across transports.

The 12 line (2026)

The migration guide centers it on ESM-ready packages (dual-format publishing, less __dirname coupling), updated CLI defaults (new projects scaffold on current best practice), and first-class support patterns for API-key + JWT hybrid auth common in agent gateways.

Practical advice

  • Upgrading 10→11 is low drama; 11→12 mainly bites packages that require() Nest internals at odd paths — test your DI test-harness utilities.
  • Monorepo consumers: stay on the same major across apps; the CLI generates per-major code.