Laravel mix error - when trying to build filament theme
Hello, i followed this guide here: https://filamentphp.com/docs/2.x/admin/appearance#building-themes - when I import filament.css in
Mix ends with error:
/resources/css/filament.css
with @import '../../vendor/filament/filament/resources/css/app.css';
Mix ends with error:
Solution:Jump to solution
Moving colors in tailwind config from module.export -> theme to module.export -> theme -> extends and removing plugin with addUtilities() resulted in fixing error, thanks everyone for your time im marking this as solved
16 Replies
Can you share your
postcss.config.js
and webpack.mix.js
file and what laravel version you're using to build with mix?from-gray-200 ? Doesn't sound like a tailwind class.
Provide your filament.css too.
Sure,
webpack.mix.js
postcss.config.js
Laravel v9.52 filament v2.17.5
Filament.css
This from-gray-200 class comes from app.css that is located in Filament package -
Directory: I used vite a lot and forgot what mix file look like 😂 what if you remove other css file from mix.js? and what is your service provider
boot()
look like?In boot i have
But obviously it results in error since mix cant build filament.css, removing other files from mix doesnt change anything tho
have you run this
npm install tailwindcss @tailwindcss/forms @tailwindcss/typography autoprefixer tippy.js --save-dev
?Yop - versions:
I think the docs have put wrong data.. should not be
mix('resources/css/filament.css')
is good, since removing
from filament.css leads to complete file build and breaking whole css on filament pages
No idea then.. please wait for the core team helps (or use vite 😆 )
Vite doesnt build aswell:
This article can help you
https://filamentphp.com/blog/easy-way-to-create-a-filament-theme-in-minutes
Filament
Easy way to create a Filament Theme in minutes! by Leandro C. Ferre...
Filament is a collection of tools for rapidly building beautiful TALL stack apps, designed for humans.
Seems pretty much like my code, problem comes from Filament's vendor CSS file
you should try again step by step..
What does your tailwind.config.js look like.
Solution
Moving colors in tailwind config from module.export -> theme to module.export -> theme -> extends and removing plugin with addUtilities() resulted in fixing error, thanks everyone for your time im marking this as solved