Skip to main content
zerotal

Documentation


Documentation / @zerotal/inertia / InertiaConfigShape

Interface: InertiaConfigShape

Defined in: inertia/src/config.ts:3

Properties

htmlTemplate

htmlTemplate: string

Defined in: inertia/src/config.ts:5

Path to the HTML template file. Default: './resources/app.html'


version

version: string

Defined in: inertia/src/config.ts:7

Asset version string for cache-busting. Default: '1'


assetsUrl

assetsUrl: string

Defined in: inertia/src/config.ts:9

Public URL prefix for built assets. Default: '/'


pagesDir

pagesDir: string

Defined in: inertia/src/config.ts:15

Directory (relative to the project root) where Inertia page components live. Used by the page-registry generator, the SSR handler, and inertiaStream(). Default: 'resources/js/pages'


ssr

ssr: boolean

Defined in: inertia/src/config.ts:30

Enable server-side rendering.

When true, InertiaProvider registers POST /__ssr which accepts { component, props, url } and returns { body, head } - the same contract as the Inertia Node SSR server. The Inertia client calls this endpoint when rendering the first page load on the server.

Pages are rendered with the framework they're authored in: React .tsx via react-dom/server, or Vue .vue via @inertiajs/vue3 + vue/server-renderer. Install the server renderer for the framework(s) the app uses.

Default: false


ssrSecret

ssrSecret: string

Defined in: inertia/src/config.ts:41

Shared secret required to reach POST /__ssr from off-box.

The endpoint is loopback-only by default, because it takes an arbitrary component name and a props bag and does real rendering work with them — upstream Inertia runs SSR as a separate process on a private port for exactly this reason. Set this (and send it as X-Inertia-SSR-Secret) only when the renderer runs on another host.

Default: "" — loopback only.


encryptHistory

encryptHistory: boolean

Defined in: inertia/src/config.ts:46

Encrypt browser history state by default for every page. Individual pages can still opt in/out per request via Inertia.encryptHistory() / clearHistory(). Default: false.