Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

koko1's avatar
Level 1

inertiajs SSR Flash Of Unstyled Content

Hello,

I am using Laravel 10 / vue3 / vite / inertiajs SSR and I am experiencing "Flash Of Unstyled Content" because tailwindcss isn't loading.

When I first load my page, everything is unstyled and then it flicks to the tailwindcss styling.

Any idea on how to fix this?

0 likes
7 replies
gych's avatar

How are you using tailwind in your project?

Did you install the package and if so how did you add it to your project or do you use cdn ?

koko1's avatar
Level 1

@gych normal installation through the laravel breeze package. php artisan breeze:install vue --ssr

Smaller pages work fine, it's just that I have a big front page with multiple sections on a single page such as services, contact, and more.

gych's avatar

@koko1 Ok and how is tailwind imported in your project? Do you have the same issue when you build the application npm run build and open it from the public folder? laravel_app/public/index.php ?

koko1's avatar
Level 1

@gych you can reproduce this by creating a fresh laravel project install breeze vue --ssr.

visiting /register or /login you will see exactly what I mean.

I found this inertiajs/inertia/issues/1760 (cant post links), which seem to have a PR already maybe it will get fixed.

jrenzi's avatar

@koko1 did you find a solution for this? I'm experiencing the same problem with breeze and vue. It flashes the unstyled page for a second and then loads it

koko1's avatar
koko1
OP
Best Answer
Level 1

@jrenzi hey sorry for the late reply, yes I have.

vite.config.js input: ["resources/css/app.css", "resources/js/app.ts"]

app.blade.php @vite(['resources/css/app.css','resources/js/app.ts', "resources/js/Pages/{$page['component']}.vue"])

3 likes

Please or to participate in this conversation.