Release 5.0.0-next.0
Pre-releasev5.0.0-next.0
⚠️ Pre-release. This is the first preview of the v5 line, published under the
npmnexttag.lateststill resolves to the stable 4.x line.
Install withnpm i @adonisjs/inertia@next.
v5 brings @adonisjs/inertia onto Inertia 3 (the latest line) and removes the
bundled Vite plugin in favor of the new @adonisjs/vite serverEntrypoints.
💥 Breaking changes
1. Inertia 3 client is now required
The adapter targets @inertiajs/core 3.4.0. Client peer dependencies moved to
^3.4.0, which in turn requires React 19 / Vue 3.5 (Svelte 5).
- Initial page data is now emitted in a
<script type="application/json">element
instead of adata-pageattribute on the root node. Handled automatically by
the@inertiaEdge tag — no change needed unless you hand-wrote the payload. clearHistory/encryptHistoryare now omitted from the page object unless
true(the client defaults both tofalse).- Inertia 3's own client-side breaking changes apply to your app code: the
inertia:invalid/inertia:exceptionevents were renamed to
inertia:httpException/inertia:networkError;router.cancel()→
router.cancelAll(); the progress-bar exports were removed; React layouts can
no longer be arrow functions; and Axios /qs/lodash-esare no longer
bundled with the client.
2. The @adonisjs/inertia/vite plugin has been removed
SSR is now driven by @adonisjs/vite v6's serverEntrypoints. The
@adonisjs/inertia/vite export no longer exists, and the ssr.bundle config
option was removed — ssr.entrypoint is the single source of truth (it must also
be listed under serverEntrypoints so it gets bundled for production).
✨ Features
- Page props may now return
null(#89).
🐛 Fixes
- Deferred mergeable props no longer run their
compute()on standard visits.
📦 Migration guide
- Upgrade Vite and Inertia to their latest versions.
- Install the prereleases:
npm i @adonisjs/inertia@next @adonisjs/vite@next npm i @inertiajs/react@^3.4.0 # or @inertiajs/vue3@^3.4.0 - Move SSR to
serverEntrypointsinvite.config.ts— there is no Inertia
Vite plugin anymore:import { defineConfig } from 'vite' import react from '@vitejs/plugin-react' import adonisjs from '@adonisjs/vite/client' - import inertia from '@adonisjs/inertia/vite' export default defineConfig({ plugins: [ react(), - inertia({ ssr: { enabled: false, entrypoint: 'inertia/ssr.tsx' } }), - adonisjs({ entrypoints: ['inertia/app.tsx'], reload: ['resources/views/**/*.edge'] }), + adonisjs({ + entrypoints: ['inertia/app.tsx'], + serverEntrypoints: ['inertia/ssr.tsx'], + reload: ['resources/views/**/*.edge'], + }), ], }) - Drop
ssr.bundlefromconfig/inertia.tsif present — keep only
ssr.entrypoint(and make sure that file is inserverEntrypointsabove). - Apply the Inertia 3 client changes in your front-end entrypoints (event
renames,router.cancelAll(), progress, non-arrow React layouts) per the
Inertia v3 upgrade guide.
🚧 Not yet implemented
This prerelease ships v3 compatibility; the v3-only protocol features are still
on the roadmap and not yet available: rescued deferred props, fragment-preserving
redirects, shared-props tracking, once props, keyed/directional & infinite-scroll
merges, multiple errors per field, and first-class flash. Nested / dot-notation
prop resolution (deferred/merge at any depth, dotted partial-reload keys) is also
not yet supported — props resolve at the top level only.
Full diff: v4.2.0...v5.0.0-next.0