WordPress / gutenberg.run

Gutenberg live branch preview provisioning service
https://playground.wordpress.net/gutenberg.html.
MIT License
26 stars 8 forks source link

Build not working on IE #2

Closed tellthemachines closed 4 years ago

tellthemachines commented 4 years ago

Trying to build a PR preview on IE11/Windows 10 fails with Object doesn't support property or method 'fetch' in the console. IE doesn't support window.fetch; something like https://github.com/axios/axios could be used instead.

aduth commented 4 years ago

Thanks for the report! It's definitely intended that gutenberg.run should support Internet Explorer.

Some specific notes:

Issue is here:

https://github.com/aduth/gutenberg.run/blob/e38bff8f03e460488adf1db0a959462d53f9d815/web/static/run.js#L171

And:

https://github.com/aduth/gutenberg.run/blob/e38bff8f03e460488adf1db0a959462d53f9d815/web/static/run.js#L181

I'd probably prefer to use a polyfill than an external library, ideally one which doesn't add any bytes for an environment where it's not needed.

Perhaps one of:

aduth commented 4 years ago

Implemented compatibility as a combination of f2368ca3e970ea25b3f4b19e925a178746fb4092 and f47797c7b2439ca1e495994a81f34e744c6dbac3.