viteTheme not working on Production

Hello All,

I am using a custom theme with filament, and it is working perfectly locally. (both with npm run dev & build)
but not working on production.
Vite is still using this syntax to load the custom theme files on the production

<script type="module" src="http://[::1]:5173/@vite/client" data-navigate-track="reload"></script><link rel="stylesheet" href="http://[::1]:5173/resources/css/filament/admin/theme.css" data-navigate-track="reload" />

my env file is set to production, i have cleared all the cache,
remove node_modules and install it again on production
site build on production,

but still, it is not working.

provider:
->viteTheme('resources/css/filament/admin/theme.css')

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,
        }),
    ],
});


theme.css
@import '../../../../vendor/filament/filament/resources/css/theme.css';

@config './tailwind.config.js';

:root {
    --filament-progressbar-color: #22c55e;
}


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/*.blade.php',
        './vendor/filament/**/*.blade.php',
    ],
    plugins: [require("daisyui")]
}


Could anyone please help me?

Thank you. πŸ™‚
Was this page helpful?