Polyfills core-js 版本
Polyfills core-js versions
由于 Internet Explorer 11 和 ES7 array.includes()
函数的问题,我不得不在 polyfills.ts
中导入 core-js/es7/array
。我注意到,已经有一个 core-js/es6/array
。
我的问题是,es7/array
是否包含旧版本 es6/array
(及更低版本)的 polyfill?我可以删除 es6/array
还是两个都需要?
对比core-js/es6/object.js with the core-js/es7/object.js可以看出,ES6 polyfill确实只添加了ES6中引入的方法,而ES7 polyfill没有涵盖。那个只增加了ES7中引入的方法。
由于 Internet Explorer 11 和 ES7 array.includes()
函数的问题,我不得不在 polyfills.ts
中导入 core-js/es7/array
。我注意到,已经有一个 core-js/es6/array
。
我的问题是,es7/array
是否包含旧版本 es6/array
(及更低版本)的 polyfill?我可以删除 es6/array
还是两个都需要?
对比core-js/es6/object.js with the core-js/es7/object.js可以看出,ES6 polyfill确实只添加了ES6中引入的方法,而ES7 polyfill没有涵盖。那个只增加了ES7中引入的方法。