Create-react-app: Remove the fetch polyfill.

Created on 10 Oct 2016  路  2Comments  路  Source: facebook/create-react-app

I think, fetch polyfill is not required. It adds 8KB to the build size (minified). Also, some users like me will use modules something like superagent or axios.

Most helpful comment

Hi, thanks for the suggestion. The difference after gzipping (which is how we recommend to serve the assets) is 1.95 kB which I don鈥檛 believe is significant enough. We might re-evaluate decisions about polyfills in the future, but for now we'll stick with keeping fetch bundled.

All 2 comments

Hi, thanks for the suggestion. The difference after gzipping (which is how we recommend to serve the assets) is 1.95 kB which I don鈥檛 believe is significant enough. We might re-evaluate decisions about polyfills in the future, but for now we'll stick with keeping fetch bundled.

@gaearon Do we need to edit this polyfill in case where we want to use axios, but also proxy it to node server, will "proxy" functionality in package.json still work in this case?

Was this page helpful?
0 / 5 - 0 ratings