diff options
author | 2022-01-01 18:54:17 -0800 | |
---|---|---|
committer | 2022-01-01 18:54:17 -0800 | |
commit | fddec807555ac4e9d02b645f5e4c91eb6d7da7c3 (patch) | |
tree | 07cd202056d6c7cb3e3f5de3449d1372a039f6ad | |
parent | dac3389b271607bb841cee7837b96d9e93cdbb2b (diff) | |
download | bun-fddec807555ac4e9d02b645f5e4c91eb6d7da7c3.tar.gz bun-fddec807555ac4e9d02b645f5e4c91eb6d7da7c3.tar.zst bun-fddec807555ac4e9d02b645f5e4c91eb6d7da7c3.zip |
[bun-framework-next] Omit the absolute URLs
-rw-r--r-- | packages/bun-framework-next/renderDocument.tsx | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/packages/bun-framework-next/renderDocument.tsx b/packages/bun-framework-next/renderDocument.tsx index 9cc6654c7..358c52f7a 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<string, string | string[]>; -// @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) { |