From 4595dd66001026164830efca323698bec3c61949 Mon Sep 17 00:00:00 2001 From: Erika <3019731+Princesseuh@users.noreply.github.com> Date: Mon, 6 Feb 2023 16:16:34 +0100 Subject: [PATCH] fix(webapi): Attempt to polyfill with undici imports directly (#6065) --- packages/webapi/src/ponyfill.ts | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/packages/webapi/src/ponyfill.ts b/packages/webapi/src/ponyfill.ts index 429951e152c1..25c880fda6a0 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,