From 4bceb57ad19b9d76f89519d624be59ea6ed797c8 Mon Sep 17 00:00:00 2001
From: Jack Hanford <jackhanford@gmail.com>
Date: Mon, 8 Nov 2021 13:58:25 -0800
Subject: rename polyfills, polyfill Object.feeze

---
 packages/bun-framework-next/client.development.tsx | 7 +++++++
 1 file changed, 7 insertions(+)

(limited to 'packages/bun-framework-next/client.development.tsx')

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) {
-- 
cgit v1.2.3

