NestJS v12: ESM, Schema Validation, and Modern Tooling

Alps Wang

Alps Wang

May 1, 2026 · 1 views

NestJS v12: A Leap Forward

The NestJS v12 roadmap signals a substantial evolution for the framework, with the full ESM migration being the most impactful change. This move aligns NestJS with the modern JavaScript ecosystem and leverages Node.js's evolving capabilities. The integration of Standard Schema validation directly into route decorators, supporting libraries like Zod and Valibot, is a significant improvement over the previous reliance on class-validator, offering more flexibility and a more declarative approach to data validation. The modernization of the toolchain, replacing Jest with Vitest, ESLint with oxlint, and Webpack with Rspack, promises considerable performance gains and faster feedback loops for developers. These choices reflect a broader industry trend towards more performant, Rust-based tooling, which is a positive sign for the long-term health and efficiency of the NestJS ecosystem.

However, the transition to ESM, while beneficial, might introduce some friction for older, deeply entrenched CommonJS projects, despite the framework's efforts to minimize this. The prompt for developers to choose between CJS and ESM during project generation is a good mitigation strategy, but thorough testing and clear migration paths will be crucial. The deprecation of Webpack in favor of Rspack, while offering speed benefits, might also require developers to adapt their build configurations. The community's requests for Bun and Biome as CLI options highlight a desire for even more choice and alignment with emerging tools, suggesting that future iterations might see further expansion of supported tooling. Overall, NestJS v12 appears to be a forward-thinking release that solidifies its position as a leading Node.js framework.

Key Points

  • NestJS v12 will feature a full migration from CommonJS to ESM across all official packages.
  • Native Standard Schema support will be integrated into route decorators, allowing direct use of libraries like Zod, Valibot, and ArkType.
  • The default toolchain is modernized, replacing Jest with Vitest, ESLint with oxlint, and Webpack with Rspack for improved performance and developer experience.
  • ESM projects will default to Vitest and oxlint, while CJS projects will retain Jest.
  • The release includes updates for NATS, Express adapter graceful shutdown, WebSocket disconnect reasons, and improved pipe transform type safety.
  • Community feedback suggests interest in additional CLI options for tools like Bun and Biome.

Article Image


📖 Source: NestJS v12 Roadmap: Full ESM Migration, Standard Schema Validation and Modernised Toolchain

Related Articles

Comments (0)

No comments yet. Be the first to comment!