diff options
author | 2023-02-06 16:16:34 +0100 | |
---|---|---|
committer | 2023-02-06 16:16:34 +0100 | |
commit | 4595dd66001026164830efca323698bec3c61949 (patch) | |
tree | 140708ade9a5d35fdd8bec05cf426b351e93d0b6 | |
parent | 61d47d25c696c739bc3be5199bc73670a50c71eb (diff) | |
download | astro-4595dd66001026164830efca323698bec3c61949.tar.gz astro-4595dd66001026164830efca323698bec3c61949.tar.zst astro-4595dd66001026164830efca323698bec3c61949.zip |
fix(webapi): Attempt to polyfill with undici imports directly (#6065)
-rw-r--r-- | packages/webapi/src/ponyfill.ts | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/packages/webapi/src/ponyfill.ts b/packages/webapi/src/ponyfill.ts index 429951e15..25c880fda 100644 --- a/packages/webapi/src/ponyfill.ts +++ b/packages/webapi/src/ponyfill.ts @@ -15,7 +15,7 @@ import { WritableStreamDefaultController, WritableStreamDefaultWriter, } from 'node:stream/web' -import * as undici from 'undici' +import { fetch, File, Headers, Request, Response } from 'undici' import { URLPattern } from 'urlpattern-polyfill' import { cancelAnimationFrame, @@ -71,12 +71,6 @@ import { initWindow, Window } from './lib/Window' import { alert } from './lib/Alert' -const fetch = undici.fetch -const Headers = undici.Headers -const Response = undici.Response -const Request = undici.Request -const File = undici.File - export { ByteLengthQueuingStrategy, CanvasRenderingContext2D, |