Closed RoccoHoward closed 8 months ago
Please be aware that Livewire either uses livewire.js or livewire.min.js depending on your APP_DEBUG setting. Wire extender will always attempt to load livewire/livewire.min.js. If APP_DEBUG is set to true, you will need to use the data-livewire-asset-uri attribute to override the asset url to livewire/livewire.js
This is mentioned in the docs 😄 You have to set the data-livewire-asset manually
Sorry. I missed the "will always attempt to load livewire/livewire.min.js" part of that, read it that would be based on APP_DEBUG variable too (It was late night coding session)
When sharing the embed code, setting the data-value isn't a good long term solution. Doing the route redirect is a bit more easier long term then putting the data attribute in every externally placed Wire code.
At least if someone has the issue it'll show up in their search for answer and hopefully you won't have to close more related issues!
No problem. You will likely only set the data-livewire-asset-uri
when you are embedding a component from a development environment. I might make a Livewire PR to keep both routes active regardless of the app environment.
I've got
APP_DEBUG=true
but wire-extender looks forlivewire.min.js
instead oflivewire.js
.It appears livewire.min.js is hardcoded and doesn't consider APP_DEBUG on line 22 of
js/wire-extender.js
.To get around this at the moment I've added a redirect route that just creates the necessary redirect to get things working.
So far, so good with the rest of setup - I'm building a live stock level embed for Shopify - which source the stock level from the internal inventory management software.