Resources/js/app.js and css/app.css not working

Not sure what I'm missing here, but any CSS or JS I add to these files are not having any effect. I've tried npm run build and restarting my web server but it's as though those files are just getting completely ignored. I've also tried artisan cache:clear and artisan view:clear Any help/suggestions appreciated. Thanks.
Solution:
For the css you’ll want to use a custom theme. The js is a little more complicated but have a look https://filamentphp.com/docs/3.x/support/assets on how you can include assets with the asset manager.
Jump to solution
6 Replies
awcodes
awcodes9mo ago
Are you using panels? Because app.js and app.css are not loaded on panels by default.
benshawuk
benshawuk9mo ago
Ah right, good to know - thanks. Yes, I'm just using the default panel. Sorry if I missed that in the docs. Is it easy to add them?
Solution
awcodes
awcodes9mo ago
For the css you’ll want to use a custom theme. The js is a little more complicated but have a look https://filamentphp.com/docs/3.x/support/assets on how you can include assets with the asset manager.
awcodes
awcodes9mo ago
You also don’t have to use a custom theme, but it will simplify that part of it to use one.
benshawuk
benshawuk9mo ago
Right, I'll take a good read of that. I assumed just editing those files would work as it did in v2. Thanks very much for the help. (Although I may have had to manually register those.. I can't remember)
tapanb
tapanb7mo ago
If you are using ngnix remove css|js| from location ~* ^.+\.(css|js|jpg|jpeg|gif|png|ico|gz|svg|svgz|ttf|otf|woff|woff2|eot|mp4|ogg|ogv|webm|webp|zip|swf|map)$
Want results from more Discord servers?
Add your server
More Posts