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
theme.css
tailwind.config.js
Could anyone please help me?
Thank you. π
6 Replies
Check you APP_URL in you env. That url is not correct.
APP_URL is set to production domain only. Still viteTheme trying to load css from local.
Even tried with this
@vite(['resources/css/app.css', 'resources/js/app.js']) But same error.
@vite(['resources/css/app.css', 'resources/js/app.js']) But same error.
did you cleared your cache after changing env values?
Yes, cleared config, views and routes
& cache
Add to your deploy script:
Thank you all,
the issue was "hot" file. which is accidentally deployed on production.
I just removed the hot file form the public directory and it is working now.