Jelajahi Sumber

add Polyfills

Artur Paikin 6 tahun lalu
induk
melakukan
ec5e2fed3a
1 mengubah file dengan 16 tambahan dan 1 penghapusan
  1. 16 1
      README.md

+ 16 - 1
README.md

@@ -97,7 +97,7 @@ Alternatively, you can also use a pre-built bundle from Transloadit's CDN: Edgly
 
 ## Plugins
 
-[List of plugins and their common options](https://uppy.io/docs/plugins/)
+[List of plugins and their common options](https://uppy.io/docs/plugins/).
 
 ### Local Sources
 
@@ -141,6 +141,21 @@ Alternatively, you can also use a pre-built bundle from Transloadit's CDN: Edgly
 
 We aim to support IE10+ and recent versions of Safari, Edge, Chrome, Firefox, and Opera.
 
+### Polyfills
+
+Uppy heavily uses Promises. If your target environment [does not support Promises](https://caniuse.com/#feat=promises), use a polyfill like `es6-promise` before initialising Uppy.
+
+When using remote providers like Google Drive or Dropbox, the Fetch API is used. If your target environment does not support the [Fetch API](https://caniuse.com/#feat=fetch), use a polyfill like `whatwg-fetch` before initialising Uppy. The Fetch API polyfill must be loaded _after_ the Promises polyfill, because Fetch uses Promises.
+
+```shell
+npm install es6-promise whatwg-fetch
+```
+```js
+require('es6-promise/auto')
+require('whatwg-fetch')
+const Uppy = require('@uppy/core')
+```
+
 ## FAQ
 
 ### Why not just use `<input type="file">`?