What's the way to go to include custom files in vite

I'm struggling way too hard to add my custom files to the vite config. This is my current vite config:
content: [
"./vendor/ralphjsmit/laravel-filament-activitylog/resources/**/*.blade.php",
"./vendor/laravel/framework/src/Illuminate/Pagination/resources/views/*.blade.php",
"./storage/framework/views/*.php",
"./resources/**/*.blade.php",
"./resources/**/*.js",
"./resources/**/*.vue",
"./resources/views/filament/**/*.blade.php"
],
content: [
"./vendor/ralphjsmit/laravel-filament-activitylog/resources/**/*.blade.php",
"./vendor/laravel/framework/src/Illuminate/Pagination/resources/views/*.blade.php",
"./storage/framework/views/*.php",
"./resources/**/*.blade.php",
"./resources/**/*.js",
"./resources/**/*.vue",
"./resources/views/filament/**/*.blade.php"
],
But files like "resources/views/filament/components/xxx.blade.php" do not seem to work without adding @vite(..) to the top of the custom page:
@vite('resources/css/app.css')

<x-filament-panels::page>
@include('filament.components.list')
</x-filament-panels::page>
@vite('resources/css/app.css')

<x-filament-panels::page>
@include('filament.components.list')
</x-filament-panels::page>
I don't believe this is the way it should work. I already tried explicitly adding "./resources/views/filament/components/list.blade.php" to the config but that didn't help either. Can someone tell me what is the actual way to go to fix this kind of stuff?
5 Replies
Dennis Koch
Dennis Koch3w ago
You did through the "Create a Filament theme" process described in the docs? You are using the Panel right?
Baspa
BaspaOP3w ago
Do I have to create a filament theme? So I can't do it without?
Dennis Koch
Dennis Koch3w ago
A Filament theme is nothing else than a CSS file and a Tailwind config So not much different of what you are doing. But you need to let Filament know, that you want a different Tailwind file. Just follow the docs and you should be good
Baspa
BaspaOP3w ago
Thanks!
Want results from more Discord servers?
Add your server