Closed larsgw closed 6 years ago
Additional testing reveals this isn't actually a problem, but even then I can't test if it does works until the errors are resolved.
Bonus incentive (apart from installing a release candidate, which I don't think I have done on npm before): it removes ~30kb from the bundle size.
Not sure about the stack error (happens only with the minified file), but IE<9 are hit by iterator.return
(https://github.com/babel/babel/issues/1286) anyway, so that won't work anytime soon probably.
iterator.return
should be fixed by babel-plugin-transform-member-expression-literals. There should probably be a separate build for IE. Still not sure about the stack error, debugging is rather difficult in IE9...
Next: this time { default: ... }
(object literals with reserved property names) is the problem which should be fixed by @babel/plugin-transform-property-literals. Just to make sure, I also installed @babel/plugin-transform-reserved-words.
Success, now we have the stack error in the normal build as well. It seems the ie8
compat mode of uglify-js accounts for things babel doesn't account for. +1! Hopefully getting this error in the normal build eases the debugging.
IE points to this line:
} else if ('0'.split(undefined, 0)[LENGTH]) {
internalSplit = function (separator, limit) {
return separator === undefined && limit === 0 ? [] : nativeSplit.call(this, separator, limit);
};
}
As if internalSplit
is accidentally calling itself for some reason.
Okay, the problem was in another version (core-js v2), excluding core-js
should work: https://github.com/zloirock/core-js/issues/248
Excluding @babel/polyfill
would probably not work, as register-runtime
still needs a fix.
Updating to rc.3
works for IE10+, so I guess that's fine.
This update involves limiting
@babel/polyfill
quite a lot:Properly updating involves determining what stage <4 polyfills Citation.js & dependencies are using, and importing those manually.
After updating and creating a bundle, running it on IE8 gives an
Out of stack space
error which has been linked to a lack of proper polyfills before. In conclusion, updating properly is most likely necessary. If not, I'll have to figure out what is causing this instead.