Admin panel styling depending on authenticated user
I tried this:
1. It doesn't work because
Auth::user()
isn't loaded at this point in time.
2. It loads from /public
. I'd prefer it if it would be included in the npm built styles.
3. The custom styles all need to be !important
to overrule Filament styling.
Any advise is appreciated!2 Replies
do the auth check and asset registration inside serving()
if you want the css built, you need another vite definition to build that file
Thanks @Dan Harrin ! All 3 solved π
For others that are looking for something similar, add your .css to
vite.config.js
and use this: