Reputation: 3436
I am using laravel 10.33 and installed the plugin "vite".
My Vite config is this one
import { defineConfig } from 'vite';
import laravel from 'laravel-vite-plugin';
export default defineConfig({
plugins: [
laravel({
input: [
'resources/css/app.css',
'resources/js/app.js'
],
refresh: true,
}),
],
});
As you can see, I have added the option "refresh:true".
My server is started with php artisan serve. And I start vite with npm run dev.
When I edit a page in my project, I expect my browser to automatically reload. Which he doesn't do.
However in the console, I can clearly see that 'vite' has detected a modification since I see this:
What would I have forgotten to do ?
Upvotes: 0
Views: 683
Reputation: 3436
in fact everything works correctly!
As soon as I created my first page with the @vite directive, the mechanics fell into place and the site is refreshed when a modification is made.
Upvotes: 0