After moving resources into a 'shared' directory - browser sync refresh during dev doesn't occur
Hi guys,
So basically I developed a resource in the admin panel (Filament/Admin/**) directory.
Recently I moved a resource and its accompaning resource directory from
Filament/Admin/
to Filament/Resources/
I added a new ->discoverResources
in the Admin panel provider, and everything seemed to be dandy.
However now when I edit the resource in the new directory and hit save in my IDE, it no longer refreshes the browser. The browser of me being in the admin panel, only refreshes when I edit a resource within the admin directory but doesn't when i edit the resource in the new directory.
I restarted my server, dumped the autoload, cleared routes, cleared the optimize, nothing.
Any suggestions on what to do?Solution:Jump to solution
Ended up going into
vite.config.js
and changing refresh: true
to specify the new directory - it now seems to be working. I'm just curious why I had to do this / if this is the correct way of asserting the autoload?
```php
refresh: [
'app/Filament/Resources/*/.php'...1 Reply
Solution
Ended up going into
vite.config.js
and changing refresh: true
to specify the new directory - it now seems to be working. I'm just curious why I had to do this / if this is the correct way of asserting the autoload?
Edit: it only reloads in the admin panel, in my tenant panel nothing refreshes for this resource?
Edit2 - Fixed it: Created a new theme, and in the tailwind.config.js
I added the shared directory - it now works: '.app/Filament/Resources/**/*.php',