I have successfully used the setup from this repo to get inertia + svelte + vite working.
github.com/tabayomi/laravel-svelte-inertia
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
The Inertia JS documentation shows the setup for Inertia+Svelte with Vite here: https://inertiajs.com/client-side-setup
However, the vite configuration presumably also requires that you set up both a vite-laravel adapter and a vite-svelte adapter. These are the two official adapters: "@sveltejs/vite-plugin-svelte" and "laravel-vite-plugin".
However, I have not been able to get "@sveltejs/vite-plugin-svelte" to work without setting "type": "module" in package.json. That is presumably fine, but setting "type": "module" in package.json breaks "laravel-vite-plugin". That seems to be a bug with an associated Draft PR here: https://github.com/laravel/vite-plugin/pull/189
From what I have been able to tell, this scenario completely eliminates the possibility of setting up Inertia+Svelte with Vite in Laravel. Since Vite is the default asset bundler for Laravel, I would recommend at least a warning about this scenario in the Inertia Js Documentation and in the Laravel documentation regarding Inertia until the issue is resolved.
What do you all think?
Please or to participate in this conversation.