diff options
Diffstat (limited to 'packages/bun-framework-next/server-polyfills.tsx')
-rw-r--r-- | packages/bun-framework-next/server-polyfills.tsx | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/packages/bun-framework-next/server-polyfills.tsx b/packages/bun-framework-next/server-polyfills.tsx index 8942154b7..887621978 100644 --- a/packages/bun-framework-next/server-polyfills.tsx +++ b/packages/bun-framework-next/server-polyfills.tsx @@ -1,21 +1,13 @@ globalThis.global = globalThis; import { Buffer } from "buffer"; +import { URL } from "url-polyfill"; +import { TextEncoder, TextDecoder } from "fast-text-encoding"; globalThis.Buffer = Buffer; import * as React from "react"; -class URL { - pathname: string; - href: string; - - constructor(base: string, source: string) { - this.pathname = source; - this.href = base + source; - } -} - var onlyChildPolyfill = React.Children.only; React.Children.only = function (children) { @@ -32,7 +24,5 @@ React.Children.only = function (children) { globalThis.URL = URL; -import { TextEncoder, TextDecoder } from "./text-encoder-polyfill"; - globalThis.TextEncoder ||= TextEncoder; globalThis.TextDecoder ||= TextDecoder; |