diff options
author | 2021-11-02 23:10:40 -0700 | |
---|---|---|
committer | 2021-11-02 23:10:40 -0700 | |
commit | 92e5fe9fd5b31d8b0ac8327a221b20dd03218502 (patch) | |
tree | ec29767d18dd3e0c540ab612ab2cf2c258e04a9e /packages/bun-framework-next/polyfills.tsx | |
parent | b107ac16599b67cd050977531914b774adcceead (diff) | |
download | bun-92e5fe9fd5b31d8b0ac8327a221b20dd03218502.tar.gz bun-92e5fe9fd5b31d8b0ac8327a221b20dd03218502.tar.zst bun-92e5fe9fd5b31d8b0ac8327a221b20dd03218502.zip |
Next.js 12 support
Diffstat (limited to 'packages/bun-framework-next/polyfills.tsx')
-rw-r--r-- | packages/bun-framework-next/polyfills.tsx | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/packages/bun-framework-next/polyfills.tsx b/packages/bun-framework-next/polyfills.tsx index b000c1f54..474ee6ec9 100644 --- a/packages/bun-framework-next/polyfills.tsx +++ b/packages/bun-framework-next/polyfills.tsx @@ -21,3 +21,8 @@ React.Children.only = function (children) { return onlyChildPolyfill(children); }; globalThis.URL = URL; + +import { TextEncoder, TextDecoder } from "./text-encoder-polyfill"; + +globalThis.TextEncoder ||= TextEncoder; +globalThis.TextDecoder ||= TextDecoder; |