Skip to content
Source
Sign inSign up
TanStack/router
Open History to see the last commit

fetch-polyfill.js

20 lines325 Bytes

1// fetch-polyfill.js
2import fetch, {
3 Blob,
4 blobFrom,
5 blobFromSync,
6 File,
7 fileFrom,
8 fileFromSync,
9 FormData,
10 Headers,
11 Request,
12 Response,
13} from 'node-fetch'
14​
15if (!globalThis.fetch) {
16 globalThis.fetch = fetch
17 globalThis.Headers = Headers
18 globalThis.Request = Request
19 globalThis.Response = Response