jantinnerezo / livewire-alert

SweetAlert2 wrapper for Livewire
https://livewire-alert.jantinnerezo.com
MIT License
682 stars 73 forks source link

Defer script loading for flashAlert() #139

Closed jigar-dhulla closed 5 months ago

jigar-dhulla commented 7 months ago

As Swal is external dependency, when Swal is loaded via vite bundler, it is deferred. Hence when using flash feature, we get error Uncaught (in promise) ReferenceError: Swal is not defined. This is because <script> inside flash is not deferred, adding type="module" to the <script> should fix that.

PR for same: https://github.com/jantinnerezo/livewire-alert/pull/137

jigar-dhulla commented 5 months ago

137 is merged.

jigar-dhulla commented 3 months ago

Changes are part of v3.0.2