Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
3.9k views
in Technique[技术] by (71.8m points)

项目中使用了Promise.allSettled ,如何兼容IE11

项目中使用了Promise.allSettled
然后提示 "对象不支持 allSettled 属性或方法"

项目中也配置了Babel

"presets": [
        [
            "@babel/preset-env", { // 取代了preset-es20**系列的babel预设
                "corejs": {
                    version: 3,
                    proposals: true  // 搞定一些提案级别的特性
                },
                "useBuiltIns": "entry" // 在入口文件的顶部引入core-js/stable和regenerator-runtime/runtime
            },
    ],

项目入口引用

    import "core-js/stable";
    import "regenerator-runtime/runtime";
    import "es6-promise"

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

自己实现一个,写一个简单的还是不复杂的,你可以上网找一个,代码就不给你贴了


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

2.1m questions

2.1m answers

60 comments

57.0k users

...