import { fileURLToPath } from "node:url"; import { readFile } from "node:fs/promises"; process.chdir(fileURLToPath(new URL(".", import.meta.url))); const { build } = await import("@getforma/build"); await build({ app: "forma-field-notes", entryPoints: [{ entry: "src/app.tsx", outfile: "home.js" }], cssEntries: [{ input: "src/styles.css", outfile: "app.css" }], routes: { "/": { js: ["home"], css: ["app"] } }, outputDir: "dist", ssr: true, strict: true, ssrEntryPoints: { home: "src/app.tsx" }, }); const manifest = JSON.parse(await readFile("dist/manifest.json", "utf8")); if (manifest.routes["/"]?.mode !== "ssr" || !manifest.routes["/"]?.ir) { throw new Error("Field Notes requires native SSR output"); }