NestJS 12 moves core packages to ESM, adds Standard Schema validation
NestJS 12 ships its core packages as ESM while CommonJS apps keep working via Node.js require(esm), adds first-class Standard Schema validation for Zod, Valibot and ArkType, rebuilds the CLI and introduces the official @nestjs/observe observability SDK. It requires Node.js 20.19+ or 22.12+, and Rspack replaces webpack as the monorepo bundler.
- Core packages are ESM, but CJS apps work via require(esm) on Node.js 20.19+ or 22.12+
- @Body, @Query and @Param accept Zod, Valibot and ArkType schemas without wrappers
- @nestjs/observe reports traces in terms of controllers and providers
- nest upgrade bumps TypeScript to v6 and swaps GraphQL Playground for GraphiQL
Read next
Software