no default css after creating custom theme
I'am creating a custom page for a ticket system.
In blade i wrote something like this:
Problem: The tailwind classes aren't applied
-> So i wanted to create a custome theme:
I've created a custom theme by running the command:
Than I added the stuff tu
vite.config.mjs
:
I added the theme to the provider:
I've run npm run build
:
Problem, the whole CSS is gone (see image)
laravel/public/build/assets/theme-Bs9B5NDh.css says:
laravel/resources/css/filament/acp/tailwind.config.js:
laravel/resources/css/filament/acp/theme.css:
---
Filament v3.3.33
Laravel v11.45.1
PHP 8.4
Solution:Jump to solution
Not sure whether it makes a difference, but in my projects (and I think in default Laravel) Tailwind runs via PostCSS. Not directly via Vite.
14 Replies
its look like you're missing the Vite Plugin for tailwind css?!
https://tailwindcss.com/docs/installation/framework-guides/laravel/vite
Hello
Hi
Yes, Vite Plugin was missing.
After adding it, I run in to the next issue:
The files are existing in the vendor folder and correctly importet in the filament code
its tailwind 3 btw
the tailwind v3 docs doesn't say to add tailwind to vite:
https://v3.tailwindcss.com/docs/guides/laravel
Install Tailwind CSS with Laravel - Tailwind CSS
Setting up Tailwind CSS in a Laravel project.
Does anyone have more ideas
Hm, it's weird that it's looking for
index.css
. You don't specify that 🤔
There are many ways to compile Tailwind.
Oh, it's looking for the index.css
in the vendor folder. That exists? 🤔Yes, it is imported in the core stuff.
But only if I add tailwindcss() to vite.
-
Yes the file is existing in vendor

Solution
Not sure whether it makes a difference, but in my projects (and I think in default Laravel) Tailwind runs via PostCSS. Not directly via Vite.
GitHub
laravel/postcss.config.js at 11.x · laravel/laravel
Laravel is a web application framework with expressive, elegant syntax. We’ve already laid the foundation for your next big idea — freeing you to create without sweating the small things. - laravel...
ouh shit, it is commented out...

now it works, crazy

thank you very much hehe
:herzen:
Lol 😅 You're welcome.