feat(server): Add basePath config to host from a directory (#2092)

Co-authored-by: Marvin Hagemeister <marvin@deno.com>
This commit is contained in:
Reed von Redwitz
2023-11-29 16:44:25 +00:00
committed by GitHub
co-authored by Marvin Hagemeister
parent fe792455ab
commit 9ab8651018
40 changed files with 810 additions and 28 deletions
+3
View File
@@ -12,6 +12,7 @@ export interface RenderStateRouteOptions {
state?: any;
error?: unknown;
params: Record<string, string | string[]>;
basePath: string;
}
export class RenderState {
@@ -44,6 +45,7 @@ export class RenderState {
partialDepth = 0;
islandDepth = 0;
url: URL;
basePath: string;
constructor(
routeOptions: RenderStateRouteOptions,
@@ -57,6 +59,7 @@ export class RenderState {
this.componentStack = componentStack;
this.url = routeOptions.url;
this.isPartial = routeOptions.url.searchParams.has(PARTIAL_SEARCH_PARAM);
this.basePath = routeOptions.basePath;
if (error) this.routeOptions.error = error;
}