feat: add error messages for missing build cache (#2551)

This commit is contained in:
Marvin Hagemeister
2024-06-26 15:33:25 +02:00
committed by GitHub
parent 28eca25a42
commit fc820e8965
8 changed files with 89 additions and 12 deletions
+5 -2
View File
@@ -1,4 +1,4 @@
import { App, setBuildCache } from "../src/app.ts";
import { App, getIslandRegistry, setBuildCache } from "../src/app.ts";
import { launch, type Page } from "@astral/astral";
import * as colors from "@std/fmt/colors";
import { type Document, DOMParser, HTMLElement } from "linkedom";
@@ -66,7 +66,10 @@ export async function buildProd(app: App<unknown>) {
app.config.build.outDir = outDir;
const builder = new Builder({});
await builder.build(app);
const cache = await ProdBuildCache.fromSnapshot(app.config);
const cache = await ProdBuildCache.fromSnapshot(
app.config,
getIslandRegistry(app).size,
);
setBuildCache(app, cache);
}