Skip to content

Not working in Edge 18 #329

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

Closed
JFGHT opened this issue Aug 5, 2019 · 5 comments
Closed

Not working in Edge 18 #329

JFGHT opened this issue Aug 5, 2019 · 5 comments

Comments

@JFGHT
Copy link
Contributor

JFGHT commented Aug 5, 2019

I'm checking the compatibility across different web browsers for my app and I found out that Vuexfire is not working on the last version of Microsoft Edge.

The error I'm getting is script1028 expected identifier string or number only by writing the actions:

bindRef: firestoreAction(({ bindFirestoreRef }, { name, ref }: Reference): void => {
  bindFirestoreRef(name, ref);
}),

unbindRef: firestoreAction(({ unbindFirestoreRef }, { name }: Reference): void => {
  unbindFirestoreRef(name);
}),

I'm also trying to track down what is the part of code that is causing the trouble so I could add some babel polyfill or something but the logs are not so helpful.

Edit:

Looks like it was about WeakMap, acording to Vuexfire docs.

I'm trying this:

['@vue/app', {
  polyfills: [
    'es6.weak-map',
  ],
}],

Cannot make it work.

@JFGHT JFGHT closed this as completed Aug 5, 2019
@JFGHT JFGHT reopened this Aug 5, 2019
@posva
Copy link
Member

posva commented Aug 5, 2019

WeakMap is indeed necessary for vuexfire. I listed it in the readme but it's not on the documentation: https://github.com/vuejs/vuefire/tree/master/packages/vuexfire#browser-support / https://vuefire.vuejs.org/vuexfire/getting-started.html#installation

But WeakMap is supported on Edge, so there must be something else

script1028 expected identifier string or number doesn't mean anything to me. If you have a stacktrace I may give guidance, otherwise a boiled down repro would help

@JFGHT
Copy link
Contributor Author

JFGHT commented Aug 5, 2019

@posva
https://github.com/JFGHT/vuexfirerepro

Add a .env.development.local file with the env variables stated in firebase.ts and then just simply run it under Edge 18.

I'm using browserstack by the way.

@posva
Copy link
Member

posva commented Aug 5, 2019

@JFGHT can you remove all the typescript stuff, the router and sass please, they shouldn't be necessary for the repro

@JFGHT
Copy link
Contributor Author

JFGHT commented Aug 5, 2019

@posva

Done.

I included Vuex though, since it's how I reproduce the error.

@posva posva closed this as completed in 4790e54 Aug 5, 2019
@posva
Copy link
Member

posva commented Aug 5, 2019

It turns out some of the transpiration wasn't correctly done so I changed the rollup config. There is a new version released

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

No branches or pull requests

2 participants