Include VITE build in layout

Hello, in Filament v2 I included Vite within the AppServiceProvider through the Filament registerTheme by placing the app(Vite::class)('resources/css/app.css). Now in v3 I didn't find how to include vite within the default layout of the Builder Panel. Could someone guide me on how to do this? Thanks
13 Replies
Dennis Koch
Dennis Koch16mo ago
Via the Panel configuration: $panel->theme()
joao nivaldo
joao nivaldoOP16mo ago
Could you give me the link to the documentation where I can find this please
Dennis Koch
Dennis Koch16mo ago
->viteTheme() in your case
joao nivaldo
joao nivaldoOP16mo ago
I include it this way ->viteTheme('default', 'resources/css/app.css'); so it breaks the site. Did I do something wrong there? Do you have to add something special in the tailwind or vite configuration? See attached image for how it looks.
joao nivaldo
joao nivaldoOP16mo ago
No description
Dennis Koch
Dennis Koch16mo ago
Not sure why you added default?
joao nivaldo
joao nivaldoOP16mo ago
I imagined that this would be the value for the theme. I'm using the default theme. What should I put it as a value? I didn't find anything in the documentation about this viteTheme method. Thanks
Dennis Koch
Dennis Koch16mo ago
Best to follow the instructions I linked you.
joao nivaldo
joao nivaldoOP16mo ago
Dennis the instructions you gave me is to build a custom theme. I just want to include vite in the default theme build so I can use some other tailwind classes that are not available in v3 css. So I figured it would just include this line in the AdminPanelProvider. And the link you gave me has nothing about vite in it. If you can guide me I would be very grateful.
Dennis Koch
Dennis Koch16mo ago
I just want to include vite in the default theme build so I can use some other tailwind classes that are not available in v3 css
That's the same as a "custom theme"
Patrick Boivin
Patrick Boivin16mo ago
Custom theme just means taking control of the Tailwind CSS configuration... you don't actually have to change anything visually.
joao nivaldo
joao nivaldoOP16mo ago
I understood. I'll do one more study then. Thanks It worked, now I understand how it works. All I had to do was create a theme and follow the steps after creating it. Thank you very much.
Want results from more Discord servers?
Add your server