Enable Echo.js without breaking Hot Reload
Ok I'm at my wit's end here... I know this is probably not strictly Filament related, but maybe there's a JS wizard here that can help
I'm trying to enable broadcasting. Here are the relevant files
As you can see, most of the code is boilerplate. It works when I run
npm run build
, but when I run npm run dev
I get the following error.
in firefox and
inside the echo.js
file
Has anyone run into something similar? Any suggestions? Googling for this error doesn't get me anything useful.3 Replies
Try Js::make('script', url('path/to/script.js'))->module()
Refence
https://github.com/filamentphp/filament/issues/8015
GitHub
FilamentAsset registering Js without path causes problems · Issue #...
Package Other Package Version v3.0.29 Laravel Version v10.19.0 Livewire Version v3.0.0-beta.10 PHP Version 8.2.9 Problem description I was running php artisan filament:upgrade command. Expected beh...
I just tried it like this
Js::make('echo', Vite::asset('resources/js/echo.js'))->module(),
and it works the script is loaded.
I'll have a look