aboutsummaryrefslogtreecommitdiff
path: root/packages/bun-framework-next/renderDocument.tsx
diff options
context:
space:
mode:
authorGravatar Jack Hanford <jackhanford@gmail.com> 2021-11-10 16:08:24 -0800
committerGravatar GitHub <noreply@github.com> 2021-11-10 16:08:24 -0800
commit6a66d9f7fb8bf26665c2a85f7e5adc9f5a08fabb (patch)
tree5ec23ceb8e399c08e15121700d934cbc9cebd8c0 /packages/bun-framework-next/renderDocument.tsx
parentfadbcca99c9653b6d4c182afeabcd1180f67bc80 (diff)
parent0b48e7272d85ffabdaf4aac01e240e71c98c09b2 (diff)
downloadbun-6a66d9f7fb8bf26665c2a85f7e5adc9f5a08fabb.tar.gz
bun-6a66d9f7fb8bf26665c2a85f7e5adc9f5a08fabb.tar.zst
bun-6a66d9f7fb8bf26665c2a85f7e5adc9f5a08fabb.zip
Merge pull request #64 from Jarred-Sumner/unused-vars
Diffstat (limited to 'packages/bun-framework-next/renderDocument.tsx')
-rw-r--r--packages/bun-framework-next/renderDocument.tsx30
1 files changed, 1 insertions, 29 deletions
diff --git a/packages/bun-framework-next/renderDocument.tsx b/packages/bun-framework-next/renderDocument.tsx
index 615224f0d..59e18fbe7 100644
--- a/packages/bun-framework-next/renderDocument.tsx
+++ b/packages/bun-framework-next/renderDocument.tsx
@@ -20,7 +20,6 @@ import {
} from "next/dist/shared/lib/utils";
import * as NextDocument from "next/document";
import * as ReactDOMServer from "react-dom/server.browser";
-import * as url from "url";
import * as React from "react";
import * as ReactIs from "react-is";
import { BODY_RENDER_TARGET } from "next/constants";
@@ -78,8 +77,8 @@ function getScripts(files: DocumentFiles) {
buildManifest,
isDevelopment,
devOnlyCacheBusterQueryString,
- disableOptimizedLoading,
} = context;
+
const normalScripts = files.allFiles.filter(isJSFile);
const lowPriorityScripts = buildManifest.lowPriorityFiles?.filter(isJSFile);
@@ -97,33 +96,6 @@ function getScripts(files: DocumentFiles) {
});
}
-// function fixLink(from: string) {
-// if (from.startsWith("/_next/http://") || from.startsWith("/_next/https://"))
-// return from.substring("/_next".length);
-// return from;
-// }
-
-// function cloneWithOverwrittenLink(element: React.ReactElement<any>) {
-// const props = { ...element.props };
-// if ("href" in element.props) {
-// props.href = fixLink(props.href);
-// }
-
-// if ("n-href" in element.props) {
-// props["n-href"] = fixLink(props["n-href"]);
-// }
-
-// if ("n-src" in element.props) {
-// props["n-src"] = fixLink(props["n-src"]);
-// }
-
-// if ("src" in element.props) {
-// props["src"] = fixLink(props.src);
-// }
-
-// return React.cloneElement(element, props);
-// }
-
interface DomainLocale {
defaultLocale: string;
domain: string;