ES6 `fetch is undefined`

后端 未结 8 912
太阳男子
太阳男子 2020-12-02 16:27

I\'m building a site with ES6 and Babel.

In a script file, I need to make an ajax call to a service on server. For that I\'m doing like this:

fetch(\         


        
8条回答
  •  既然无缘
    2020-12-02 17:27

    Babel-polyfill (http://babeljs.io/#polyfill) currently doesn't include fetch in the polyfill. I was thinking of adding it though.

    But yeah can use https://github.com/github/fetch

提交回复
热议问题