From fddec807555ac4e9d02b645f5e4c91eb6d7da7c3 Mon Sep 17 00:00:00 2001 From: Jarred Sumner Date: Sat, 1 Jan 2022 18:54:17 -0800 Subject: [PATCH] [bun-framework-next] Omit the absolute URLs --- packages/bun-framework-next/renderDocument.tsx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/packages/bun-framework-next/renderDocument.tsx b/packages/bun-framework-next/renderDocument.tsx index 9cc6654c7f..358c52f7a7 100644 --- a/packages/bun-framework-next/renderDocument.tsx +++ b/packages/bun-framework-next/renderDocument.tsx @@ -31,9 +31,6 @@ const dev = process.env.NODE_ENV === "development"; type ParsedUrlQuery = Record; -// @ts-expect-error TS doesn't understand that Bun is a global -const origin: string = Bun.origin; - const isJSFile = (file: string) => file.endsWith(".js") || file.endsWith(".jsx") || @@ -347,6 +344,7 @@ export async function render({ const getStaticProps = (PageNamespace as any)?.getStaticProps || null; const { default: AppComponent_ } = AppNamespace || {}; var query = Object.assign({}, route.query); + const origin = ""; // These are reversed in our Router versus Next.js...mostly due to personal preference. const pathname = route.name; @@ -356,7 +354,7 @@ export async function render({ for (let i = 0; i < routeNames.length; i++) { const filePath = routePaths[i]; const name = routeNames[i]; - pages[name] = [origin + filePath]; + pages[name] = [filePath]; } if (appStylesheets.length > 0) {