filamentphp / filament

A collection of beautiful full-stack components for Laravel. The perfect starting point for your next app. Using Livewire, Alpine.js and Tailwind CSS.
https://filamentphp.com
MIT License
19.18k stars 2.95k forks source link

Instructions to compile extra Tailwind classes #14632

Closed patrick-leb closed 2 weeks ago

patrick-leb commented 2 weeks ago

The only bit of info i could find was here: https://filamentphp.com/docs/3.x/tables/advanced#custom-row-classes

however, this was not enough in my case. I had add this to my AppServiceProvider as well:

    public function boot(): void
    {
        FilamentAsset::register([
            Css::make('app-css',Vite::asset('resources/css/app.css')),
            Js::make('app-js',Vite::asset('resources/css/app.js')),
        ]);
    }

I think its probably worth its own section too :)

EDIT: I just realized that this bricks artisan commands if you don't run npm run build first to have the manifest.json generated. This is probably not the best option.

Donate 💰 to fund this issue

Fund with Polar

zepfietje commented 2 weeks ago

Please check the following docs: https://filamentphp.com/docs/3.x/panels/themes#creating-a-custom-theme.

patrick-leb commented 2 weeks ago

Respectfully, I'm not looking at creating a new theme, I simply need a way to add a couple of tailwind classes here and there.

zepfietje commented 2 weeks ago

"Theme" might sound like a lot more, but essentially it's a compiled stylesheet. A theme is in fact what you should use to achieve your goal.