17 lines
618 B
TypeScript
17 lines
618 B
TypeScript
import type { Plugin } from "esbuild";
|
|
import type { PageFiles } from "../../../types";
|
|
type SSRVirtualEntry = PageFiles & {
|
|
tsx: string;
|
|
};
|
|
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 {};
|