zloirock / core-js

Standard Library
MIT License
24.6k stars 1.66k forks source link

Function.prototype.call: 'this' is not a Function object. #1274

Closed brylevm04 closed 1 year ago

brylevm04 commented 1 year ago

Hey, sorry if this is wrong and not related to core-js per se, but I've encountered an issue when transpiling my app to IE11.

Using webpack developer mode, I see that in the module core-js/internals/map-iterate.js, one line causes an error in script loading in IE11.

Particularly, this line: var next = entries(new Map()).next;

The error is Function.prototype.call: 'this' is not a Function object.

I don't really know where to look to fix this issue, so I'd really appreciate help understand if this is an issue on my end or with core-js.

Thanks.

zloirock commented 1 year ago

That means that in your case missed import of core-js/modules/es.map before a module that uses Map with proper ES6+ semantics - it could be proposals with Map helpers or Array#uniqueBy. If you inject core-js automatically, check your targets - they should contain IE11.

brylevm04 commented 1 year ago

Thanks, I'll look into it