npm run build error, run dev not working
Followed the directions I made a new theme
Followed these steps
Run build does include my custom page and the tailwind class take effect! great.
But I get a warning that does not make sense:
Also npm run dev does NOT effect my custom page changes
Gist of files https://gist.github.com/ddoddsr/f777762adb35c1908546ce98a1d1e3b5
Gist
Missing content warning and npm run dev does not process changes
Missing content warning and npm run dev does not process changes - postcss.config.js
17 Replies
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 does work NOT so it makes for a painful dev env.
Page in
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 @Leandro Ferreira , @Dennis Koch 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
. and from vite.config.js
.
I am using valet
if that makes a differenceAny 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.Solution
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