aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--packages/bun-framework-next/empty.tsx (renamed from packages/bun-framework-next/index.js)2
-rw-r--r--packages/bun-framework-next/package.json10
-rw-r--r--packages/bun-framework-next/server-polyfills.tsx2
-rw-r--r--packages/bun-framework-next/server.production.tsx0
4 files changed, 9 insertions, 5 deletions
diff --git a/packages/bun-framework-next/index.js b/packages/bun-framework-next/empty.tsx
index bbf5800ce..14a7c49f6 100644
--- a/packages/bun-framework-next/index.js
+++ b/packages/bun-framework-next/empty.tsx
@@ -1 +1,3 @@
// Keep this file here so that main resolves correctly
+
+export {};
diff --git a/packages/bun-framework-next/package.json b/packages/bun-framework-next/package.json
index 4c2ad494a..f82243b71 100644
--- a/packages/bun-framework-next/package.json
+++ b/packages/bun-framework-next/package.json
@@ -1,8 +1,8 @@
{
"name": "bun-framework-next",
"version": "12.0.5",
- "main": "index.js",
- "module": "index.js",
+ "main": "empty.tsx",
+ "module": "empty.tsx",
"description": "Bun compatibility layer for Next.js v12.0.x",
"scripts": {
"test": "echo Worked",
@@ -86,9 +86,9 @@
}
},
"production": {
- "client": "client.production.tsx",
- "server": "server.production.tsx",
- "fallback": "fallback.production.tsx",
+ "client": "empty.tsx",
+ "server": "empty.tsx",
+ "fallback": "empty.tsx",
"css": "onimportcss"
}
}
diff --git a/packages/bun-framework-next/server-polyfills.tsx b/packages/bun-framework-next/server-polyfills.tsx
index 474ee6ec9..d34c08fc5 100644
--- a/packages/bun-framework-next/server-polyfills.tsx
+++ b/packages/bun-framework-next/server-polyfills.tsx
@@ -13,6 +13,7 @@ class URL {
}
}
var onlyChildPolyfill = React.Children.only;
+
React.Children.only = function (children) {
if (children && typeof children === "object" && children.length == 1) {
return onlyChildPolyfill(children[0]);
@@ -20,6 +21,7 @@ React.Children.only = function (children) {
return onlyChildPolyfill(children);
};
+
globalThis.URL = URL;
import { TextEncoder, TextDecoder } from "./text-encoder-polyfill";
diff --git a/packages/bun-framework-next/server.production.tsx b/packages/bun-framework-next/server.production.tsx
deleted file mode 100644
index e69de29bb..000000000
--- a/packages/bun-framework-next/server.production.tsx
+++ /dev/null