Re-add fetch polyfill (#727)

Removed in #367, but core-js does not include fetch, and eslint-plugin-compat just doesn't seem to complain when inside an if block.
This commit is contained in:
Norbert Renner 2023-05-08 17:15:58 +02:00
parent 79a8c6ab9a
commit 32107759e2
4 changed files with 19 additions and 2 deletions

View file

@ -5,6 +5,15 @@
"es2021": true
},
"settings": {
"polyfills": ["URL", "Promise", "navigator", "Uint8Array", "performance", "location.hostname", "document.body"]
"polyfills": [
"URL",
"Promise",
"navigator",
"Uint8Array",
"performance",
"location.hostname",
"document.body",
"fetch"
]
}
}

View file

@ -142,3 +142,5 @@ Copyright (c) 2018 Norbert Renner and [contributors](https://github.com/nrenner/
[CC0-1.0 License](https://github.com/ideditor/temaki/blob/main/LICENSE.md)
- [leaflet-osm-notes](https://github.com/osmlab/leaflet-osm-notes)
[The Unlicense](https://github.com/osmlab/leaflet-osm-notes/blob/gh-pages/LICENSE)
- [Fetch polyfill](https://github.com/Github/fetch)
Copyright (c) 2014-2016 GitHub, Inc.; [MIT License](https://github.com/github/fetch/blob/master/LICENSE)

View file

@ -84,7 +84,8 @@
"regenerator-runtime": "0.13.11",
"togpx": "nrenner/togpx#722d291",
"tokml": "0.4.0",
"url-search-params": "1.1.0"
"url-search-params": "1.1.0",
"whatwg-fetch": "^3.6.2"
},
"devDependencies": {
"@babel/cli": "7.19.3",

View file

@ -12602,6 +12602,11 @@ whatwg-encoding@^2.0.0:
dependencies:
iconv-lite "0.6.3"
whatwg-fetch@^3.6.2:
version "3.6.2"
resolved "https://registry.yarnpkg.com/whatwg-fetch/-/whatwg-fetch-3.6.2.tgz#dced24f37f2624ed0281725d51d0e2e3fe677f8c"
integrity sha512-bJlen0FcuU/0EMLrdbJ7zOnW6ITZLrZMIarMUVmdKtsGvZna8vxKYaexICWPfZ8qwf9fzNq+UEIZrnSaApt6RA==
whatwg-mimetype@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/whatwg-mimetype/-/whatwg-mimetype-3.0.0.tgz#5fa1a7623867ff1af6ca3dc72ad6b8a4208beba7"