aboutsummaryrefslogtreecommitdiff
path: root/packages/bun-framework-next/page-loader.ts
diff options
context:
space:
mode:
authorGravatar Jack Hanford <jackhanford@gmail.com> 2021-11-07 11:46:22 -0800
committerGravatar Jack Hanford <jackhanford@gmail.com> 2021-11-07 11:46:22 -0800
commit183911514aec44c0fecf04a36621df8a951d8a7b (patch)
treea293cb462950409ee3689187f81cf02164d03dff /packages/bun-framework-next/page-loader.ts
parentbc3c17ffc8cd56e92c4002ef923e9ae0e0e30246 (diff)
downloadbun-183911514aec44c0fecf04a36621df8a951d8a7b.tar.gz
bun-183911514aec44c0fecf04a36621df8a951d8a7b.tar.zst
bun-183911514aec44c0fecf04a36621df8a951d8a7b.zip
misc cleanup for bun-framework-nextnext-cleanup
Diffstat (limited to 'packages/bun-framework-next/page-loader.ts')
-rw-r--r--packages/bun-framework-next/page-loader.ts28
1 files changed, 0 insertions, 28 deletions
diff --git a/packages/bun-framework-next/page-loader.ts b/packages/bun-framework-next/page-loader.ts
index 7bb6c2a25..1d43d9f81 100644
--- a/packages/bun-framework-next/page-loader.ts
+++ b/packages/bun-framework-next/page-loader.ts
@@ -1,6 +1,5 @@
import NextPageLoader from "next/dist/client/page-loader";
import getAssetPathFromRoute from "next/dist/shared/lib/router/utils/get-asset-path-from-route";
-// import createRouteLoader from "./route-loader";
export function insertStyleSheet(url: string) {
if (document.querySelector(`link[href="${url}"]`)) {
@@ -16,22 +15,15 @@ export function insertStyleSheet(url: string) {
link.href = url;
- // if (headCount) {
- // document.head.insertBefore(headCount, link);
- // } else {
document.head.appendChild(link);
- // }
});
}
export default class PageLoader extends NextPageLoader {
- public routeLoader: RouteLoader;
-
constructor(_, __, pages) {
super(_, __);
// TODO: assetPrefix?
- // this.routeLoader = {}; //createRouteLoader("");
// Rewrite the pages object to omit the entry script
// At this point, the entry point has been loaded so we don't want to do that again.
@@ -130,25 +122,5 @@ export default class PageLoader extends NextPageLoader {
} catch (exception) {
console.error({ exception });
}
-
- // return this.routeLoader.loadRoute(route).then((res) => {
- // debugger;
- // if ("component" in res) {
- // return {
- // page: res.component,
- // mod: res.exports,
- // styleSheets: res.styles.map((o) => ({
- // href: o.href,
- // text: o.content,
- // })),
- // };
- // }
- // throw res.error;
- // });
}
-
- // not used in development!
- // prefetch(route: string): Promise<void> {
- // return this.routeLoader.prefetch(route);
- // }
}