Livewire 3 Customizing the asset URL / Livewire3 is not working without PHP artisan serve

 

You can try reference the livewire assests from AppServiceProvider.php

use Illuminate\Support\ServiceProvider;
 

use Livewire\Livewire;

use Illuminate\Support\Facades\Route;


 

class AppServiceProvider extends ServiceProvider
{
    public function boot(): void
    {
        Livewire::setScriptRoute(function ($handle) {
            return Route::get('/example-app/livewire/livewire.js', $handle);
        });

        Livewire::setUpdateRoute(function ($handle) {
            return Route::post('/example-app/livewire/update', $handle);
        });


    }
}