diff options
Diffstat (limited to '')
-rw-r--r-- | packages/bun-framework-next/client.development.tsx | 7 | ||||
-rw-r--r-- | packages/bun-framework-next/server-polyfills.tsx (renamed from packages/bun-framework-next/polyfills.tsx) | 0 |
2 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) { diff --git a/packages/bun-framework-next/polyfills.tsx b/packages/bun-framework-next/server-polyfills.tsx index 474ee6ec9..474ee6ec9 100644 --- a/packages/bun-framework-next/polyfills.tsx +++ b/packages/bun-framework-next/server-polyfills.tsx |