Use filament custom theme without npm/node
Hello everyone,
is it possible, to use a custom theme in filament without npm? My webspace provider don't provide node. So I can use purely php. But when creating and registering a new custom template, this template works only during running npm run dev. So, when it's possible, what I have to do? I don't find anything about this in the docs neither via google search.
Thanks in advance
Solution:Jump to solution
In local run
npm run build
push build file to git. pull from server and it will work8 Replies
Can you use ftp ? Or when you ready to publish your template you can just run npm prod and copy all the files to your web services using ftp
You can compile on your machine and upload everything
But better ditch such provider
Solution
In local run
npm run build
push build file to git. pull from server and it will workThank you very much for these approaches, in any case, you are already helping me. I guess this will help me in any case. Otherwise, I would look up here again for more in-depth questions.
This is just the only one that offers me the required scope of services for free.
keep searching I guess
For my understanding: Into which directories is compiling done with
npm run dev
or npm run build
?same
Hm. When I run
npm run build
I became a broken template. Running npm run dev
the vite server is runs and I get a working template. Shuting down the vite server, the template brokes.
Using ->viteTheme('resources/css/filament/app/theme.css')
in the PanelServiceProvider my template references assets at the vite server:
So how can I use my template without an active vite-server?
The generated assets at public\build... aren't used anywhere. What I'm doing wrong?
I found the error: file public\hot
coontains http://[::1]:5173/
, after deleting it, the right references appears.