[Bug]: Cannot load css/js assets under a non-root URI
warkingous opened this issue · 2 comments
warkingous commented
What happened?
Hello,
locally everything works fine - Windows 11, xampp, app url: http://127.0.0.1:9000
but in production - ubuntu 23.10, apache2, app url: https://domain.com/test
Im having errors about loading these assets:
GET https://domain.com/rappasoft/laravel-livewire-tables/core.min.css net::ERR_ABORTED 404 (Not Found)
GET https://domain.com/rappasoft/laravel-livewire-tables/thirdparty.css net::ERR_ABORTED 404 (Not Found)
GET https://domain.com/rappasoft/laravel-livewire-tables/core.min.js net::ERR_ABORTED 404 (Not Found)
GET https://domain.com/rappasoft/laravel-livewire-tables/thirdparty.min.js net::ERR_ABORTED 404 (Not Found)
Everything else works fine - Livewire works fine, no errors, it just completely ignores the fact that the app_url is
https://domain.com/test, it tries to load these assets from https://domain.com/ instead https://domain.com/test
How to reproduce the bug
No response
Package Version
3.1
PHP Version
8.2.x
Laravel Version
10
Alpine Version
No response
Theme
Tailwind 3.x
Notes
No response
Error Message
No response
lrljoe commented
Easiest and best way is to bundle the code rather than rely on the injection approach
stale commented
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.