FilamentF
Filamentβ€’2y ago
Strangler

Vite dev server keeps sending wrong data

Hi all,
I don't know if any of you have had the same problem, but my vite dev-server does not update anything when I add a new class.

Example one: I add a class to a custom page: text-green-500.
vite makes the page reload, but the class doesn't get picked up.

At this point I thought: well, maybe there's something wrong with my theme. It used to work, why doesn't it now?
Checking everything, I found no issues.

I decided to run npm run build (which is just vite build). Tadaaa, everything works as expected.

Weird. I had also added custom colors to my theme's 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',
        './resources/views/tables/**/*.blade.php',
        './vendor/filament/**/*.blade.php',
    ],
    theme: {
        extend: {
            colors: {
                'danger': 'rgb(220,53,69)',
                'muted': 'rgba(33,37,41,.75)'
            },
        }
    }
}

I decided to remove the colors. Vite dev: keeps the colors. Vite build: removes the colors.

At this point I've spent about 6 hours to try and solve this, but I'm stuck. I've tried vite --force as well, but it's not helping.

Help please. πŸ™
Solution
Oh god. I just rebooted my entire system. Works like a charm now.
Was this page helpful?