#npm run build error, run dev not working

1 messages · Page 1 of 1 (latest)

upper pulsar
#

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

Gist

Missing content warning and npm run dev does not process changes - postcss.config.js

stable sluiceBOT
#

To help others find answers, you can mark your question as solved via Right click solution message -> Apps -> ✅ Mark Solution

echo gulch
upper pulsar
#

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

echo gulch
upper pulsar
#

I tried your suggestion but thought './resources/views/filament/**/*.blade.php', would do it, Still no update via npm run dev.

echo gulch
fallow valley
upper pulsar
echo gulch
upper pulsar
upper pulsar
#

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!

fallow valley
upper pulsar
upper pulsar
#

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

fallow valley
#

Any errors in DevTools?

upper pulsar
#

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.

fallow valley
#

Are you using an Adblocker?

upper pulsar
#

BrveBrowser!

fallow valley
#

So probably yes. Disable it for you dev page

upper pulsar
#

Yes it works in plain Chrome. A upgrade of Brave lost that config... thanks so much