aboutsummaryrefslogtreecommitdiff
path: root/packages/bun-framework-next/renderDocument.tsx
diff options
context:
space:
mode:
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;