You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This seems related to changes in the way built-ins (e.g. Date, Uint16Array, Error, ...) are able to be extended in Babel 7 (surfacing in babel/babel#7020).
In Babel's wrapNativeSuper, the use of typeof Reflect is transpiled (when published) to use Babel's own _typeof helper function, which IE11 takes issue with (throws) as Reflect is undeclared. It ends up looking like this when shipped to the client:
A native typeof Reflect in IE11 does return "undefined", as expected, but the problem arises specifically with the use of _typeof(Reflect). Additionally, if the line above is changed to the following, everything seems to work okay in IE11:
I suppose Meteor could fix this by shipping Reflect polyfills in ecmascript-runtime-client, but this does seem like a bug in Babel and seeing as IE11 is one of two so-called "modern browsers" which doesn't natively support Reflect, it seems like a waste to ship that polyfill if we can avoid it.
This is my take, however @benjamn may know the cleanest way to fix this.
benjamn
changed the title
1.6.1 does not work on Internet Explorer 11 when app includes a definition of a class with extends
[1.6.1] Missing Reflect in Internet Explorer 11 when app includes a class that extends a built-in class
Jan 30, 2018
I believe we can make this work with a patch update to ecmascript-runtime-client by adding just the Reflect.construct polyfill (which is a small subset of the whole Reflect polyfill). Then in Meteor 1.6.2 we can restrict that polyfill to legacy browsers (#9439), since modern browsers (as we're defining them—anything with native async/await) should all have native support for Reflect.construct.
Accessing an app by IE11 causes '"Reflect" is not defined' error in modules.js.
To reproduce it,
meteor create reproduction.
cd reproduction
add the following code into client/main.js.
class DummyError extends Error {}
invoke meteor
access the page by IE11.
Doesn't Babel 7 support IE11?
The text was updated successfully, but these errors were encountered: