Skip to main content

Interface: StaticExportOptions

Defined in: static.ts:32

Properties

appDir?

optional appDir?: string

Defined in: static.ts:40

Filesystem path to the app directory, relative to cwd. Ignored when apps is given. Unlike StaticExportApp.routePrefix, this single-app routePrefix is never part of the output path — the export always serves this app from the site root. Default "app".


apps?

optional apps?: StaticExportApp[]

Defined in: static.ts:53

Crawl multiple apps in one export — each with its own appDir/routePrefix/paths/ exclude — instead of the single-app appDir/routePrefix/paths/exclude fields above. outDir is still cleaned exactly once regardless of app count.


assetsDir?

optional assetsDir?: string

Defined in: static.ts:58

Directory of built hydration/static assets, copied verbatim into outDir. Default "dist/public".


concurrency?

optional concurrency?: number

Defined in: static.ts:64

Maximum number of pages to crawl concurrently, across all apps. Default 5.


exclude?

optional exclude?: (string | RegExp)[]

Defined in: static.ts:49

Route paths to skip. Ignored when apps is given.


host?

optional host?: string

Defined in: static.ts:36

Host of the already-running server to crawl. Default "127.0.0.1".


notFound?

optional notFound?: boolean

Defined in: static.ts:62

Probe and write the app's real _404 page to <outDir>/404.html. In the multi-app apps form, the first app in the list is authoritative for this site-wide fallback. Default true.


outDir?

optional outDir?: string

Defined in: static.ts:55

Directory to write the exported static site to. Default "dist/export".


paths?

optional paths?: string[]

Defined in: static.ts:47

Extra prefix-free route paths to crawl, beyond what appDir convention discovers. Ignored when apps is given.


port

port: number

Defined in: static.ts:34

Port of the already-running server to crawl.


routePrefix?

optional routePrefix?: string

Defined in: static.ts:44

URL prefix the React route is mounted at (e.g. "/app"). Prepended only to the fetch URL — discovered/explicit route paths are always prefix-free. Ignored when apps is given. Default "".