【问题标题】:Polyfills core-js versionsPolyfills core-js 版本
【发布时间】:2018-03-14 08:17:18
【问题描述】:

由于 Internet Explorer 11 和 ES7 array.includes() 函数存在问题,我不得不在 polyfills.ts 中导入 core-js/es7/array。我注意到,已经有一个core-js/es6/array

我的问题是,es7/array 是否包含旧版本 es6/array(及以下)的 polyfill?我可以删除es6/array 还是两个都需要?

【问题讨论】:

    标签: angular ecmascript-6 polyfills ecmascript-2016


    【解决方案1】:

    比较 core-js/es6/object.jscore-js/es7/object.js 之后,很明显 ES6 polyfill 确实只添加了 ES6 中引入的方法,而 ES7 polyfill 没有涵盖这一点。那个只添加了 ES7 中引入的方法。

    【讨论】:

    • 那么应该去掉还是不去掉??
    • 不应删除
    • 做同样的事情。包含功能在我的反应应用程序中不起作用,并在添加 import 'core-js/es7/array' 后开始工作。我保留了 es6 和 es7
    猜你喜欢
    • 2020-03-04
    • 1970-01-01
    • 2019-02-25
    • 1970-01-01
    • 2020-02-01
    • 1970-01-01
    • 2018-11-11
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多