chore: remove unused runtimeJS option (#120)
This commit is contained in:
@@ -52,21 +52,6 @@ export interface ErrorPageProps {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export interface PageConfig {
|
export interface PageConfig {
|
||||||
/**
|
|
||||||
* By default, runtime JS is disabled. This means that interactivity on the
|
|
||||||
* client that depends on Preact or other JS code will not function.
|
|
||||||
*
|
|
||||||
* Runtime JS can be enabled by setting `runtimeJS` to `true`.
|
|
||||||
*
|
|
||||||
* It is recommended to keep runtime JavaScript disabled for static pages that
|
|
||||||
* do not require interactivity, like marketing or blog pages.
|
|
||||||
*
|
|
||||||
* Note that the runtime JS feature will likely be overhauled in the future to
|
|
||||||
* provide more granular control over which components need to be hydrated on
|
|
||||||
* the client.
|
|
||||||
*/
|
|
||||||
runtimeJS?: boolean;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A route override for the page. This is useful for pages where the route
|
* A route override for the page. This is useful for pages where the route
|
||||||
* can not be expressed through the filesystem routing capabilities.
|
* can not be expressed through the filesystem routing capabilities.
|
||||||
|
|||||||
@@ -154,7 +154,6 @@ export class ServerContext {
|
|||||||
name,
|
name,
|
||||||
component,
|
component,
|
||||||
handler: handler ?? ((req) => router.defaultOtherHandler(req)),
|
handler: handler ?? ((req) => router.defaultOtherHandler(req)),
|
||||||
runtimeJS: Boolean(config?.runtimeJS ?? false),
|
|
||||||
csp: Boolean(config?.csp ?? false),
|
csp: Boolean(config?.csp ?? false),
|
||||||
};
|
};
|
||||||
} else if (
|
} else if (
|
||||||
@@ -174,7 +173,6 @@ export class ServerContext {
|
|||||||
component,
|
component,
|
||||||
handler: handler ??
|
handler: handler ??
|
||||||
((req, ctx) => router.defaultErrorHandler(req, ctx.error)),
|
((req, ctx) => router.defaultErrorHandler(req, ctx.error)),
|
||||||
runtimeJS: Boolean(config?.runtimeJS ?? false),
|
|
||||||
csp: Boolean(config?.csp ?? false),
|
csp: Boolean(config?.csp ?? false),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -502,7 +500,6 @@ const DEFAULT_NOT_FOUND: UnknownPage = {
|
|||||||
url: "",
|
url: "",
|
||||||
name: "_404",
|
name: "_404",
|
||||||
handler: (req) => router.defaultOtherHandler(req),
|
handler: (req) => router.defaultOtherHandler(req),
|
||||||
runtimeJS: false,
|
|
||||||
csp: false,
|
csp: false,
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -511,7 +508,6 @@ const DEFAULT_ERROR: ErrorPage = {
|
|||||||
url: "",
|
url: "",
|
||||||
name: "_500",
|
name: "_500",
|
||||||
handler: (req, ctx) => router.defaultErrorHandler(req, ctx.error),
|
handler: (req, ctx) => router.defaultErrorHandler(req, ctx.error),
|
||||||
runtimeJS: false,
|
|
||||||
csp: false,
|
csp: false,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -85,7 +85,6 @@ export interface UnknownPage {
|
|||||||
name: string;
|
name: string;
|
||||||
component?: ComponentType<UnknownPageProps>;
|
component?: ComponentType<UnknownPageProps>;
|
||||||
handler: UnknownHandler;
|
handler: UnknownHandler;
|
||||||
runtimeJS: boolean;
|
|
||||||
csp: boolean;
|
csp: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -95,7 +94,6 @@ export interface ErrorPage {
|
|||||||
name: string;
|
name: string;
|
||||||
component?: ComponentType<ErrorPageProps>;
|
component?: ComponentType<ErrorPageProps>;
|
||||||
handler: ErrorHandler;
|
handler: ErrorHandler;
|
||||||
runtimeJS: boolean;
|
|
||||||
csp: boolean;
|
csp: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user