diff options
author | 2021-11-08 13:58:25 -0800 | |
---|---|---|
committer | 2021-11-08 13:58:25 -0800 | |
commit | 4bceb57ad19b9d76f89519d624be59ea6ed797c8 (patch) | |
tree | 35310fead6251b378ad3b9476ea684a19ff69e21 /packages/bun-framework-next/client.development.tsx | |
parent | c7705a6325143aee71b351d5701ba46373704ff6 (diff) | |
download | bun-4bceb57ad19b9d76f89519d624be59ea6ed797c8.tar.gz bun-4bceb57ad19b9d76f89519d624be59ea6ed797c8.tar.zst bun-4bceb57ad19b9d76f89519d624be59ea6ed797c8.zip |
rename polyfills, polyfill Object.feeze
Diffstat (limited to 'packages/bun-framework-next/client.development.tsx')
-rw-r--r-- | packages/bun-framework-next/client.development.tsx | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/packages/bun-framework-next/client.development.tsx b/packages/bun-framework-next/client.development.tsx index 2dcffe55c..3921bf011 100644 --- a/packages/bun-framework-next/client.development.tsx +++ b/packages/bun-framework-next/client.development.tsx @@ -1,6 +1,13 @@ globalThis.global = globalThis; globalThis.Bun_disableCSSImports = true; +// We're disabling Object.freeze because it breaks CJS => ESM and can cause +// issues with Suspense and other things that expect the CJS module namespace +// to be mutable when the ESM module namespace is NOT mutable +globalThis.Object.freeze = (obj) => { + return obj; +}; + import * as React from "react"; var onlyChildPolyfill = React.Children.only; React.Children.only = function (children) { |