Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Livewire not initializing in IE11 and Edge #585

Closed
ruudsnl opened this issue Feb 3, 2020 · 4 comments
Closed

Livewire not initializing in IE11 and Edge #585

ruudsnl opened this issue Feb 3, 2020 · 4 comments

Comments

@ruudsnl
Copy link
Contributor

ruudsnl commented Feb 3, 2020

Describe the bug
Hello! Thanks so much for this great package.
It seems Livewire is not initalizing in IE11 and Edge. Tested in IE11 and Edge 42. This seems to be related to the use of spread syntax in object literals (see additional context below).

To Reproduce

  • Add @livewireScripts to your view
  • Open application in IE11 or Edge
  • Check console, the following error appears:
    Expected identifier, string or number

Expected behavior
I expected livewire to initalize

Screenshots
image

It seems to have to do with this code snippet (according to Edge):
PrefetchMessage.js
image

Desktop:

  • IE11 or Edge 42 on Windows 10 (tested via browserstack)

Additional context
My suspicion is that it has to do with the use of spread syntax in object literals (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Spread_syntax#Spread_in_object_literals), it seems this is not supported by earlier versions of Edge and Internet Explorer 11. We might be able to "transpile" this problem away using Babel?

@ruudsnl
Copy link
Contributor Author

ruudsnl commented Feb 3, 2020

I'm not a Babel expert, but this might be of help https://babeljs.io/docs/en/babel-plugin-proposal-object-rest-spread

@calebporzio
Copy link
Collaborator

Yeah, that's probably right. I'd like Livewire to support those browsers, so I'd love it if someone can try to get this fixed and PR the fix. Thanks!

@ruudsnl
Copy link
Contributor Author

ruudsnl commented Feb 4, 2020

#586
There you go! @calebporzio :)

@lancepioch
Copy link
Contributor

@ruudschuurmans Thank you for fixing this with your pr!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants