Unable to locate file in Vite manifest: .../admin/theme.css

This is what I have in the Vite config file, the path to the admin/theme.css file is correct (theme created using artisan command). import { defineConfig } from 'vite'; import laravel from 'laravel-vite-plugin'; import vue from '@vitejs/plugin-vue'; export default defineConfig({ plugins: [ laravel({ input: [ 'resources/css/app.css', 'resources/css/filament/admin/theme.css', 'resources/js/app.js', ], ssr: 'resources/js/ssr.js', refresh: true, }), vue({ template: { transformAssetUrls: { base: null, includeAbsolute: false, }, }, }), ], }); The error only happens in production environment (after running npm run build) Also the manifest file exists, the file reference is present and also the file exists in the assets folder. Am I missing something ? Thanks guys
Solution:
Found out why, in AdminPanelProvider I was using the absolute path to the admin theme.css resource. It requires the relative path only!
Jump to solution
2 Replies
Dennis Koch
Dennis Koch4mo ago
Please read our #✅┊rules and check your code formatting. Sounds like the actual build folder is missing on the production system. Did you npm run build on production or local?
Solution
2l30926048
2l309260484mo ago
Found out why, in AdminPanelProvider I was using the absolute path to the admin theme.css resource. It requires the relative path only!
Want results from more Discord servers?
Add your server