Promise is undefined in IE11 using babel-polyfill

后端 未结 2 1126
旧时难觅i
旧时难觅i 2021-02-04 03:03

As the title says, even I\'d like to use babel-polyfill to allow me to use promises in my code, but I get that undefined error in IE11.

I\'ve been trying to make this wo

2条回答
  •  难免孤独
    2021-02-04 03:54

    From Babel 7.4.0 you need to install and import these libraries:

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

    like they said here: https://babeljs.io/docs/en/babel-polyfill

提交回复
热议问题