Skip to content
Inertia

Configuration

InertiaServiceProvider reads config in register / boot:

Key Type Effect
inertia.root_view string Sets InertiaManager.rootView
inertia.root_html string Sets InertiaManager.rootHtml
inertia.version string Sets InertiaManager.version
inertia.public_path path string Vite public directory; default <app.basePath>/public

Example:

.configure { cfg ->
cfg.set("inertia.root_view", "app")
cfg.set("inertia.version", "1")
cfg.set("inertia.public_path", app.basePath.resolve("public").toString())
}

Runtime changes after boot:

Inertia.version("2")
Inertia.manager().rootView = "shell"
Inertia.manager().viteEntries = listOf("resources/js/app.js")