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.
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
@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.
@JFGHT can you remove all the typescript stuff, the router and sass please, they shouldn't be necessary for the repro
@posva
Done.
I included Vuex though, since it's how I reproduce the error.
It turns out some of the transpiration wasn't correctly done so I changed the rollup config. There is a new version released
Most helpful comment
It turns out some of the transpiration wasn't correctly done so I changed the rollup config. There is a new version released