node-wpapi icon indicating copy to clipboard operation
node-wpapi copied to clipboard

Optimize browser bundle for wpapi/fetch

Open kadamwhite opened this issue 6 years ago • 4 comments

Extracted from #432, we should try to alias out fetch and form-data to avoid bloating the browser build. We'd want to note to add a fetch polyfill for IE11 support, but one is built into WordPress itself.

kadamwhite avatar Oct 21 '19 21:10 kadamwhite

This looks great. Fetch is very well supported with good isomorphic polyfils available. Superagent being somewhat bloated and redundant in-light of fetch support.

My only comment would e IE11 is currently broken anyway...?

andrewmclagan avatar Oct 21 '19 23:10 andrewmclagan

IE11 issue will be addressed separately :grimacing: I regret missing that one and am glad that several issues were opened catching the mistake... if anybody has bandwidth to help PR that fix, assistance would be significantly appreciated!

kadamwhite avatar Oct 24 '19 01:10 kadamwhite

Could do later in the month

andrewmclagan avatar Oct 25 '19 00:10 andrewmclagan

I would note that despite Wordpress having a fetch polyfill, allot of folks are using Wordpress as a headless CMS

andrewmclagan avatar Nov 26 '19 23:11 andrewmclagan