Skip to content

Commit

Permalink
fix(webapi): Attempt to polyfill with undici imports directly (#6065)
Browse files Browse the repository at this point in the history
  • Loading branch information
Princesseuh committed Feb 6, 2023
1 parent 61d47d2 commit 4595dd6
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions packages/webapi/src/ponyfill.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 4595dd6

Please sign in to comment.