Vite is refreshing always in windows
See original GitHub issue- Laravel Version: 9.27.0
- PHP Version: 8.1.2
- Database Driver & Version: NA
- OS: Windows 11, execute directly (no docker, no sail, no WSL)
Description:
When using refresh: false
in vite.config.js
, the browser is still hot reloaded as soon as a file is saved.
Steps To Reproduce:
Using this vite.config.js
config file, execute npm run dev
and serve
to see the website in the browser. Make a change in a file, save, and the browser is reloaded, although there is refresh: false
in the config file.
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: false,
}),
],
});
Issue Analytics
- State:
- Created a year ago
- Comments:10 (6 by maintainers)
Top Results From Across the Web
Vite keeps refreshing the page with logs stuck in `connecting`
I've had to define host where vite is running, because by default it's taken from window.location.hostname , so that's why it never connects....
Read more >Troubleshooting - Vite
Vite cannot handle and does not support code that only runs on non-strict mode (sloppy mode). This is because Vite uses ESM and...
Read more >Vite.js (Vue): Unwanted Page Reload Happens Only On ...
It seems Samsung Internet browser disallows insecure websockets. A workaround is to enable HTTPS in Vite with server.https , so that it ...
Read more >Automatic reload | Guide - Vite PWA - Netlify
Automatic reload #. With this behavior, once the browser detects a new version of your application, then, it will update the caches and...
Read more >Fixing the 'cannot GET /URL' error on refresh with React ...
In this post you'll learn how to fix the 'cannot GET /URL' error with React Router. Along the way, you'll also learn how...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This behaviour is expected and is not introduced by the Laravel plugin.
See: https://github.com/vitejs/vite/issues/9512#issuecomment-1208133617
Vite has to do a refresh as there are circular dependencies when using Tailwind.
no troubles