Cell API
    Preparing search index...

    Interface Preset

    The shape of a build output for a platform (docs/design/modules.md §4): the backend entry and bundle format, files around the bundles, how to run the output locally and which deployer publishes it.

    interface Preset {
        deployer?: string;
        description?: string;
        entry?: string;
        extends?: string;
        format?: "esm" | "cjs";
        name: string;
        options?: StandardSchema<unknown>;
        outDir?: string;
        runtime?: ServerRuntime;
        staticHosting?: boolean;
        detect?(env: ProcessEnv): boolean;
        output?(context: PresetOutputContext): void | Promise<void>;
        preview?(
            context: PresetPreviewContext,
        ): PreviewProcess | Promise<PreviewProcess>;
    }
    Index
    deployer?: string

    Name of the deployer cell deploy uses for this output.

    description?: string

    One-line description for cell info and --help.

    Optionalentry

    entry?: string

    Name of the backend entry, picked from the components' entries (e.g. http).

    extends?: string

    Name of the preset whose fields this one inherits.

    format?: "esm" | "cjs"

    Server bundle format unless the project chooses one.

    name: string
    options?: StandardSchema<unknown>

    Schema of the preset's options: the field of cell.config.ts named like the preset (e.g. fc: { region: 'cn-shanghai' }). The field is accepted whichever preset a build uses.

    outDir?: string

    Output directory unless the project chooses one, e.g. .vercel/output where the platform looks for it.

    runtime?: ServerRuntime

    Runtime the server bundle runs on. Default node.

    staticHosting?: boolean

    The platform serves the frontend as static files: --single and --compile do not apply.

    • Recognises the CI platform this preset targets; only consulted when CI is set.

      Parameters

      • env: ProcessEnv

      Returns boolean