Upgrading
What to change in your project when you move to a new major of nestjs-inertia.
Node.js 24, Inertia.lazy() and the codegen option
The release that requires Node.js 24 or newer covers every package: @dudousxd/nestjs-inertia,
-client, -testing, -vite, -cli and -codegen-extension. Upgrade the Node.js version your
app runs and builds on first.
Then update your code:
-
Inertia.lazy()is gone. It was an alias ofInertia.optional(), so rename the calls:// before stats: Inertia.lazy(() => this.stats.load()), // after stats: Inertia.optional(() => this.stats.load()), -
InertiaModule.forRoot({ codegen })is gone, along with theCodegenOptionstype and theNESTJS_INERTIA_DISABLE_AUTO_CODEGENvariable. The option only started the watcher of the old@dudousxd/nestjs-inertia-codegenpackage. Deletecodegen: { enabled: false }from your module. To regenerate in dev, runnestjs-codegen --watch, or registerNestjsCodegenModule.forRoot(...)from@dudousxd/nestjs-codegen/nest(see the Codegen guide).