adi518 / vue-facebook-login

💅 A renderless Vue.js component for composing Facebook Login
https://git.io/Jkhqf
MIT License
195 stars 53 forks source link

Vue Facebook Login Plugin throwing " Expected '(' " error in console #70

Closed hubertclumberdale closed 3 years ago

hubertclumberdale commented 3 years ago

When we land on our website using IE 11, we receive this error in console:

Screenshot 2021-03-12 at 17 42 25

If i click on that error, i land on this other tab in the developer tools:

Screenshot 2021-03-12 at 17 42 56

We are using Vue 2 with Vue Facebook Login Component version 4.0.0

adi518 commented 3 years ago

I had a look and it looks like some vendor generator functions (function*) related to async/await are not being transformed into ES5, which is required for IE 11 support. It's a configuration issue.

adi518 commented 3 years ago

Try the new version: 4.0.1. This bug was reproducible in IE 11 using my demo. Per this commit the idea was to drop regenerator and save some KBs, but it seems transform-regenerator cannot be excluded because it then doesn't transform async/await functions. I re-included this plugin in Babel configuration to fix the issue, but it should be optimized later to transform only, excluding any polyfill code that bloats the package.