Reputation: 7852
I use TypeScript
and Babel
.
I have code like:
const map1 = new Map(...);
const map2 = new Map(...);
const foo = [...map1, ...map2];
If I import just:
require('core-js/es6/map');
above code (spreading) not work as expect (IE 11
), but if I import:
require('core-js');
code works as expect.
How to import just necessary functionality for spread Map
objects?
Upvotes: 0
Views: 3571
Reputation: 152206
You should give a try with babel-plugin-transform-object-rest-spread
. In my case, when using babel-preset-env
, object spreading was not available by default.
Upvotes: 0