fix: dev command loading snapshot (#1735)

This commit is contained in:
Marvin Hagemeister
2023-09-05 12:34:05 +02:00
committed by GitHub
parent 4fcf422a64
commit b1a02108c5
5 changed files with 127 additions and 71 deletions
+2 -2
View File
@@ -148,7 +148,7 @@ export class ServerContext {
*/
static async fromManifest(
manifest: Manifest,
opts: FreshOptions & { skipSnapshot?: boolean },
opts: FreshOptions & { skipSnapshot?: boolean; dev?: boolean },
): Promise<ServerContext> {
// Get the manifest' base URL.
const baseUrl = new URL("./", manifest.baseUrl).href;
@@ -435,7 +435,7 @@ export class ServerContext {
}
}
const dev = isDevMode();
const dev = opts.dev ?? isDevMode();
if (dev) {
// Ensure that debugging hooks are set up for SSR rendering
await import("preact/debug");