LOCALHOST How to fix Uncaught ReferenceError: Livewire is not defined

Please share this information many people get this problems when using localhost dev

publish the livewire config to laravel config dir
php artisan vendor:publish --tag=livewire:config

and change the asset_url value in the config/livewire to the root or public dir of your app. Eg. http://your-app/public