ReferenceError: regeneratorRuntime is not defined (but working inside a scope)

前端 未结 3 1745
借酒劲吻你
借酒劲吻你 2021-02-07 02:53

I\' ve come across this strange occurrence of:

ReferenceError: regeneratorRuntime is not defined

... which I\'ve managed to reproduce in a very minima

3条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-02-07 03:17

    I know this has been answered but, unfortunately, they didn't fix the problem for me. what solved it was to import babel babel-polyfills inside the file

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

    you can find it on the official babeljs documetation orat this article

提交回复
热议问题