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
Via the Panel configuration:
$panel->theme()
Could you give me the link to the documentation where I can find this please
->viteTheme()
in your caseI 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.
Not sure why you added
default
?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
Best to follow the instructions I linked you.
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.
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 cssThat's the same as a "custom theme"
Custom theme just means taking control of the Tailwind CSS configuration... you don't actually have to change anything visually.
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.