F
Filamentβ€’12mo ago
Veur

Custom theme: Unable to locate file in Vite manifest

I created a custom theme according to: https://filamentphp.com/docs/3.x/panels/themes#creating-a-custom-theme Then I registered it in the Panel provider: ->viteTheme('resources/css/filament/client/theme.css') This is my vite.config.js:
import { defineConfig } from 'vite';
import laravel from 'laravel-vite-plugin';

export default defineConfig({
plugins: [
laravel({
input: [
'resources/css/app.css',
'resources/css/client.css',
'resources/js/app.js',
],
refresh: true,
}),
],
input: [
'resources/css/filament/client/theme.css',
],
});
import { defineConfig } from 'vite';
import laravel from 'laravel-vite-plugin';

export default defineConfig({
plugins: [
laravel({
input: [
'resources/css/app.css',
'resources/css/client.css',
'resources/js/app.js',
],
refresh: true,
}),
],
input: [
'resources/css/filament/client/theme.css',
],
});
And I ran npm run build But in production it still gives this error (locally it works fine): Unable to locate file in Vite manifest: resources/css/filament/client/theme.css
Solution:
This input array
No description
Jump to solution
5 Replies
Matthew
Matthewβ€’12mo ago
whut
Solution
Matthew
Matthewβ€’12mo ago
This input array
No description
Matthew
Matthewβ€’12mo ago
you dont create a new array So in this case
import { defineConfig } from 'vite';
import laravel from 'laravel-vite-plugin';

export default defineConfig({
plugins: [
laravel({
input: [
'resources/css/app.css',
'resources/css/filament/client/theme.css',
'resources/js/app.js',
],
refresh: true,
}),
],
});
import { defineConfig } from 'vite';
import laravel from 'laravel-vite-plugin';

export default defineConfig({
plugins: [
laravel({
input: [
'resources/css/app.css',
'resources/css/filament/client/theme.css',
'resources/js/app.js',
],
refresh: true,
}),
],
});
Then ofc npm run build @Veur
Veur
VeurOPβ€’12mo ago
Ah, of course πŸ™‚ Thanks!
Matthew
Matthewβ€’12mo ago
Np πŸ™‚
Want results from more Discord servers?
Add your server