Your AdonisJS ecosystem, in the loop.
All insights
releaseBreaking changeAction required

Inertia 5.0.0 Release: Inertia 3 Support and Full Protocol Coverage

· Developer impact : high

The @adonisjs/inertia package released version 5.0.0, upgrading to support Inertia 3 and implementing the v3 protocol surface on the server. This release introduces several server-side features such as once props, keyed and directional merges, infinite scroll, rescued deferred props, first-class flash messages, shared props tracking, and support for multiple validation errors per field. On the client side, it adds route-aware useRouter, typed query strings, method overrides on multi-method routes, type-safe useHttp, correlated instant visits, and improved Vue and React wrappers. The @adonisjs/inertia/vite plugin was removed in favor of using @adonisjs/vite v6's serverEntrypoints. The upgrade requires React 19 or Vue 3.5 due to Inertia 3 client peer dependency changes. Several breaking changes and migration steps are detailed, including changes to SSR configuration and client event names.

What this means for your code

Developers must upgrade to Inertia 3 client libraries (React 19 or Vue 3.5), remove the @adonisjs/inertia/vite plugin and migrate SSR configuration to use @adonisjs/vite serverEntrypoints. Client-side code must adapt to renamed Inertia events and updated APIs. New server-side features and client typings enable more robust and type-safe Inertia usage but require code changes. Validation error handling and flash message handling have improved, requiring updates to middleware and client code. The migration involves package upgrades, configuration changes, and adapting to new client APIs.

  • Upgrade @adonisjs/inertia and @adonisjs/vite to latest versions.
  • Upgrade @inertiajs/react or @inertiajs/vue3 to version ^3.4.0.
  • Remove @adonisjs/inertia/vite plugin from vite.config.ts.
  • Configure SSR entrypoints using @adonisjs/vite serverEntrypoints option.
  • Remove ssr.bundle option from config/inertia.ts, keep only ssr.entrypoint.
  • Update frontend code to handle Inertia 3 client breaking changes (event renames, API changes).
  • Adapt middleware to implement optional flash() hook for first-class flash messages.
  • Use new server-side features like once props, keyed merges, infinite scroll, and rescued deferred props as needed.
  • Update client usage to leverage route-aware useRouter, typed query strings, method overrides, and type-safe useHttp.
  • Adjust validation error handling to support multiple errors per field if desired.

Original sources

AI-generated analysis based on the linked sources. Check the original documentation before changing your application.

Independent ecosystem watch. Sources linked in every insight.Built with AdonisJS · AI-assisted summariesBy Jérémy Chaufourier · chaufourier.fr