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

irsyadadl's avatar

SSR Problem with VITE

laravel new project
cd project
composer require laravel/breeze --dev
php artisan breeze:install react --ssr
npm install && npm run build
node bootstrap/ssr/ssr.mjs

Could you please help me ?

0 likes
4 replies
thinkverse's avatar
Level 15

That's a known issue and was fixed in the v0.5.1 release of laravel-vite-plugin, for previous versions, @timacdonald recommends this temporary fix.

export default defineConfig({
    // ...
    ssr: {
        noExternal: [
            'laravel-vite-plugin',
            '@inertiajs/server',
        ],
    },
});

Remember to rebuild using npm run build after you've added 'laravel-vite-plugin' to the noExternal array.

3 likes
thinkverse's avatar

@0mar updated my answer to include which version it was fixed in. 👍 Yes, the @inertiajs/server is added automatically by the breeze install command so that should still be there. The issue was with the laravel-vite-plugin as I understood it.

1 like
seedphrase's avatar

@thinkverse yes it's added by the breeze and the Jetstream install command with Inertia stack and with SSR support. So yeah, I think so, that should still be there. Thank you!

Please or to participate in this conversation.