Vite Not Reflecting File Changes Without Cache Clear in Bagisto – How to Fix in Dev?
-
Hi Team,
I'm working on a custom Bagisto theme using Vite for asset bundling. The setup works fine, but I'm facing an issue during development:
Every time I make a change to my CSS/JS or Blade files, I have to manually clear the cache to see the updates.
Here’s a summary of my setup:
Using laravel-vite-plugin in Bagisto (inside a custom theme)
.env is set to:APP_ENV=local APP_DEBUG=true
I’m running npm run dev during development
Can anyone guide me how to fix this properly for development so changes reflect instantly without clearing cache every time?
Any tips or best practices would be greatly appreciated.Thanks in advance!
-
Hello @arunchahar
Whenever any changes are made, it's important to recompile the assets.
To do this, you need to run either npm run build or npm run dev.Warm Regards
Team Bagisto