es-abstract: Errors in IE11 if imported after react-app-polyfills/ie11

If you import react-app-polyfill/ie11 before importing any shim/polyfill using this lib, you get an error in IE11.

Error: object doesn't support property or method Symbol(Symbol.iterator)_9.<some-hash> Location: GetIntrinsic.js at line 56. Workaround: import react-app-polyfill/ie11 after importing all shims/polyfills using this lib.

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Reactions: 2
  • Comments: 21 (10 by maintainers)

Most upvoted comments

@ljharb,

Just wanted to report back that core-js did work! I’m back up and running in IE 11. IE sure is slow compared to Chrome, but it works. Guess I’ll stick with core-js. I thought polyfill.io was the standard, but this is the second time it’s let me down.

I have filed it there as well. See https://github.com/facebook/create-react-app/issues/5615 .

I agree with your assertion. Additionally, I can see the argument being made that a polyfill which is broken by the import of a standards-compliant polyfill is a broken polyfill.

Note - I haven’t verified anyone’s standards compliance. 😛

I’d never recommend it - always unconditionally apply every polyfill/shim to every browser, full stop.

@ljharb, I really have to try again to use core-js (first time I tried, I couldn’t get it to work, but I later realized something was corrupted with my app, so that may have been the cause).

Anyway, I’m not entirely sure my repo covers the OP’s problem, so I don’t know if this issue should be closed or not, but I’ll definitely let you know if the issue disappears with core-js instead of polyfill.io.

Yeah. The following breaks.

import 'core-js/es6/symbol';
import objectValues from 'object.values/polyfill';

Aha - symbols can’t be shimmed, only shammed.

Can you reproduce this just by loading core-js before this library?