Closed tomchadwin closed 7 years ago
Hey @tomchadwin, good spot. I assumed that Babel transpiled these down to ES5 but it looks like you need a Polyfill:
https://babeljs.io/docs/usage/polyfill
Sure you could use a Set specific Polyfill such as :
https://www.npmjs.com/package/es6-set
At the moment I think Set is the only ES6 feature that wouldn't get transpiled. We only use it for the data structure that determines if things have changed. Might just be easier to use a Object or Array in some fashion.
If changing it to some other structure is an option, that would be great. I've no babel experience, so while I can try changing the src, I don't know the build process to generate the lib to test.
Confirmed that Set
is the only polyfill required, though the one I've used from polyfill.io in turn uses Symbol
, so I had to use that one as well. I also had to tweak one of the polyfills as well, weirdly. Anyway, it works now, but if you are able to consider removing Set
, that would simplify things a great deal.
We just use an array now in 5.0.1 :+1:
I don't think the minified version has built - still has Set
.
Oh, and sorry about this: looks like Object.values()
hasn't transpiled down either. Is that required?
Looks like you've fixed all of this in v6. Nice. Thanks!
Yeah sorry, I forgot to mention I removed it :)
When used in a QtWebkit environment, this fails because of no support for
Set
, I believe. What's the best approach - a polyfill? Or is there some option in your build process to compile a version compatible with older JS engines?Other errors might subsequently transpire, but let's fix them as they arise.