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

rszabo@crowleyauto.net's avatar

Vite Jetsteam -Livewire not refreshing the page

I installed a fresh laravel project and installed jetstream with livewire. This is supposed to setup vite to work out of the box from what I understand. I'm not working in any of the developer environments like sail, docker, homestead, etc. I'm just installing with composer and working locally. I run php artisan serve, and then npm run dev. Both load, vite shows vite v2.9.14 dev server running at:

Local: http://localhost:3000/ Network: use --host to expose ready in 430ms. Laravel v9.20.0 APP_URL: http://127.0.0.1:8000 When I look in the browser console it shows connecting...connected. When I make page changes the terminal shows it's updating by showing an X2,X3 etc. However, the browser never refreshes. I have tried this both in chrome and edge. Not really sure what I'm missing. Vite config import { defineConfig } from 'vite'; import laravel, { refreshPaths } from 'laravel-vite-plugin';

export default defineConfig({ plugins: [ laravel({ input: [ 'resources/css/app.css', 'resources/js/app.js', ], refresh: [ ...refreshPaths, 'app/Http/Livewire/', 'resources/routes/', 'routes/', 'resources/views/', ], }), ], });

Thanks for any help you can provide.

0 likes
1 reply
zlatiborac's avatar

I had almost the same problem and I think this is the answer

Warning This Vite plugin, as Livewire needs to persist in page, is not fully compatible with other plugins that full refresh the page when a .blade.php file changes (i.e. laravel/vite-plugin with refresh option active) in order to make them work together, blade files in /livewire/ should be excluded from blade hot reload. For Laravel Vite plugin, this config would solve the issue:

Please or to participate in this conversation.