#3247·inertia

Inertia + Vue3: Code splitting does not work correctly under SSR, causing layout shifting, bad scaling.

Author: umiko1478-altCreated Sep 7, 2026Updated Sep 7, 2026
Labelsvue 3

@inertiajs/vue3 Version

3.6.1

Backend stack (optional)

Laravel, Vue 3, PHP 8.3.

Describe the problem

Initially, only the main file app.js and the app.css is output via the SSR without code splitted chunks. All other component js, css files are connected after rehydration, causing layout shifting because the client did not preload all the necessary chunks.

Only manual chunking with SSR works correctly, but it doesn't scale well with a huge number of components (300+). Each selected chunk will be added to the final page render one way or another because of this.

I think this issue can be resolved in 100-200 lines, but I don't have time to open a pull request. Please fix this in the next update.

Steps to reproduce

Any SSR config with Vue and Code Splitting