FilamentF
Filament13mo ago
Baspa

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"
    ],


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>


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?
Was this page helpful?