diff options
author | 2021-11-16 10:22:22 -0800 | |
---|---|---|
committer | 2021-11-22 10:21:29 -0800 | |
commit | 7f62169b5e50a6c01d261915a827bfcea98d522d (patch) | |
tree | 6a336c97ba13b884a104aa4d621ee18a6683e835 /packages/bun-framework-next/server-polyfills.tsx | |
parent | 5b2c7ad1f3300feba7a1bcdbbe5b8a7172575a9c (diff) | |
download | bun-7f62169b5e50a6c01d261915a827bfcea98d522d.tar.gz bun-7f62169b5e50a6c01d261915a827bfcea98d522d.tar.zst bun-7f62169b5e50a6c01d261915a827bfcea98d522d.zip |
add prettier to root
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; |