F
Filamentβ€’4mo ago
Christophe

Custom page messing up sidebar

I made a custom page where I built a custom Livewire component. I also added the app.css file as I needed the tailwind-classes.
@vite(['resources/css/app.css'])

<x-filament-panels::page>
<livewire:subject-tree />
</x-filament-panels::page>
@vite(['resources/css/app.css'])

<x-filament-panels::page>
<livewire:subject-tree />
</x-filament-panels::page>
It all works fine locally but when I deployed, it messed up the layout. The navigation overlaps my component. First screenshot is how it should be, second is the one on the server. Am I missing something? Publishing assets, config, ... ? The weird part is that all the functionality works as it should, it's just the css that doesnt work as expected.
No description
No description
12 Replies
toeknee
toekneeβ€’4mo ago
npm run build on prod
Christophe
ChristopheOPβ€’4mo ago
Fair enough, that works but it's in my deploy script as well (the deploy:build task):
task('deploy', [
'deploy:info',
'deploy:setup',
'deploy:lock',
'deploy:release',
'deploy:update_code',
'deploy:shared',
'deploy:vendors',
'deploy:modules',
'deploy:build',
'deploy:writable',
'artisan:storage:link',
'artisan:migrate',
'artisan:cache:clear',
'artisan:config:cache',
'artisan:queue:restart',
'artisan:view:cache',
'artisan:update-schedule-monitor',
'deploy:symlink',
'deploy:reload',
'deploy:unlock',
'deploy:cleanup',
]);
task('deploy', [
'deploy:info',
'deploy:setup',
'deploy:lock',
'deploy:release',
'deploy:update_code',
'deploy:shared',
'deploy:vendors',
'deploy:modules',
'deploy:build',
'deploy:writable',
'artisan:storage:link',
'artisan:migrate',
'artisan:cache:clear',
'artisan:config:cache',
'artisan:queue:restart',
'artisan:view:cache',
'artisan:update-schedule-monitor',
'deploy:symlink',
'deploy:reload',
'deploy:unlock',
'deploy:cleanup',
]);
toeknee
toekneeβ€’4mo ago
Did it resolve it? I am not familiar with your tasker Might need to restart FPM depending on your setup too.
Christophe
ChristopheOPβ€’4mo ago
Yes it worked but I'm not sure why I should build it afterwards on the server if I'm building it first with my deploy script. I will look into it. Thanks though!
toeknee
toekneeβ€’4mo ago
No problem
Christophe
ChristopheOPβ€’4mo ago
FYI: this is the deploy package I'm using: https://deployer.org/
Deployer - The deployment tool for PHP | Deployer
Deployer is a tool for deploying PHP applications to a remote server.
toeknee
toekneeβ€’4mo ago
Interesting, I just use Ploi
Dennis Koch
Dennis Kochβ€’4mo ago
Not sure why you are injecting @vite() above the page instead of using a theme? How is your deploy:build defined?
Christophe
ChristopheOPβ€’4mo ago
task('deploy:build', function () {
run('cd {{release_path}} && npm run build');
});
task('deploy:build', function () {
run('cd {{release_path}} && npm run build');
});
Dennis Koch
Dennis Kochβ€’4mo ago
It sounds a bit hacky to me πŸ˜… Hm. Weird.
Christophe
ChristopheOPβ€’4mo ago
It is though but it was not quite clear to me how I could solve it otherwise
Want results from more Discord servers?
Add your server