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.