rappasoft / laravel-livewire-tables

A dynamic table component for Laravel Livewire
https://rappasoft.com/docs/laravel-livewire-tables/v2/introduction
MIT License
1.7k stars 320 forks source link

[Bug]: Cannot load css/js assets under a non-root URI #1608

Closed warkingous closed 5 months ago

warkingous commented 6 months ago

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 6 months ago

Easiest and best way is to bundle the code rather than rely on the injection approach

stale[bot] commented 5 months ago

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.