Fix build lags

This commit is contained in:
2026-10-02 14:48:38 +01:00
parent 17a5c3df01
commit 8fa5b64b48
38 changed files with 1390 additions and 1238 deletions
@@ -1,9 +1,16 @@
import type { Plugin } from "esbuild";
import type { PageFiles } from "../../../types";
type Params = {
entryToPage: Map<string, PageFiles & {
tsx: string;
}>;
type SSRVirtualEntry = PageFiles & {
tsx: string;
};
export default function ssrVirtualFilesPlugin({ entryToPage }: Params): Plugin;
type Params = {
/**
* Lazily-resolved current virtual entry contents. The map is refreshed
* before every rebuild so edits to `.server.ts`/api files (whose virtual
* entries mirror their raw file content) are picked up by a plain
* `ctx.rebuild()` without recreating the esbuild context.
*/
getEntryToPage: () => Map<string, SSRVirtualEntry>;
};
export default function ssrVirtualFilesPlugin({ getEntryToPage }: Params): Plugin;
export {};