Followed the directions I made a new theme php artisan make:filament-theme admin
Followed these steps
⇂ First, add a new item to the `input` array of `vite.config.js`: `resources/css/filament/admin/theme.css` ⇂ Next, register the theme in the admin panel provider using `->viteTheme('resources/css/filament/admin/theme.css')` ⇂ Finally, run `npm run build` to compile the theme
Run build does include my custom page and the tailwind class take effect! great.
But I get a warning that does not make sense:
warn - The `content` option in your Tailwind CSS configuration is missing or empty. warn - Configure your content sources or your generated CSS will be missing styles. warn - https://tailwindcss.com/docs/content-configuration
Also npm run dev does NOT effect my custom page changes
Gist of files https://gist.github.com/ddoddsr/f777762adb35c1908546ce98a1d1e3b5
#npm run build error, run dev not working
1 messages · Page 1 of 1 (latest)
they are warns. Just remove app.css from vite.config.js
Is your page inside resources/views/filament/pages ?
Commented out the app.css, no more warning. Thanks1. But the npm run dev does work NOT so it makes for a painful dev env.
Page in resources/views/filament/resources/client-resource/pages/launch-to-date.blade.php
add in the tailwind.config.js content './resources/views/filament/resources/client-resource/**/*.blade.php'
I tried your suggestion but thought './resources/views/filament/**/*.blade.php', would do it, Still no update via npm run dev.
I think the issue is the path in content..
Should do it. Did you add the ->viteTheme() to the. PanelProvider?
npm run build works with or with out the extra line in the content. the npm run dev does not work with either.
what is the output from run dev?
Yes I did add '->viteTheme('resources/css/filament/admin/theme.css')' exactly as instructed after running php artisan make:filament-theme admin
I added 'resources/views/filament/**/*.blade.php' to the vite.config , and now npm run dev runs on change. Not in the docs but I should have known.. thanks @echo gulch , @fallow valley for the assist!
Didn't you say yesterday, that it didn't work?! 🤔
Yes it did not work when I put it in the wrong file. Thanks for the note. As I said, I should have known, thanks for the assist
I am again lost in the woods. npm run build works, BUT npm run dev just sits there and I get a unstyled mess on all pages. from resources/css/filament/admin/tailwind.config.js ``` import preset from '../../../../vendor/filament/filament/tailwind.config.preset'
export default {
presets: [preset],
content: [
'./app/Filament//*.php',
'./resources/views/filament//.blade.php',
'./vendor/filament/**/.blade.php',
],
}. and from `vite.config.js` import { defineConfig } from 'vite';
import laravel from 'laravel-vite-plugin';
export default defineConfig({
plugins: [
laravel({
input: [
// 'resources/css/app.css',
'resources/js/app.js',
'resources/css/filament/admin/theme.css',
],
refresh: true,
}),
],
});```.
I am using valet if that makes a difference
Any errors in DevTools?
YEs this `127.0.0.1:5173/resources/css/filament/admin/theme.css:1
Failed to load resource: net::ERR_BLOCKED_BY_CLIENT`
new to me.
Are you using an Adblocker?
BrveBrowser!
So probably yes. Disable it for you dev page
Yes it works in plain Chrome. A upgrade of Brave lost that config... thanks so much