Skip to content

ide.json: Inertia ​

Overview ​

The packages.inertia section configures Inertia.js page resolution — where Laravel Idea looks for page components and how their names are formatted.

Note: This configuration previously lived under the top-level inertia key. That key is now deprecated — use packages.inertia instead. The top-level inertia key still works for backward compatibility, but new configurations should be placed under packages.

packages.inertia.ignoreSettingsPaths ​

When true, Laravel Idea ignores the Inertia page paths configured in the IDE settings and uses only the paths declared in ide.json. Default: false.

This is useful for packages or multi-tenant setups where the default settings paths are wrong for the project.

json
{
    "$schema": "https://laravel-ide.com/schema/laravel-ide-v2.json",
    "packages": {
        "inertia": {
            "ignoreSettingsPaths": true,
            "pagePaths": [
                { "path": "/resources/js/Pages" }
            ]
        }
    }
}

packages.inertia.pagePaths ​

An array of directories that contain Inertia page components. Each entry supports optional prefix and suffix transformations applied to the page name during completion.

FieldRequiredDescription
pathYesPath to the pages directory.
prefixNoString prepended to each page name in completion.
suffixNoString appended to each page name (e.g. a file extension to strip).

Example: standard setup ​

json
{
    "$schema": "https://laravel-ide.com/schema/laravel-ide-v2.json",
    "packages": {
        "inertia": {
            "pagePaths": [
                { "path": "/resources/js/Pages" }
            ]
        }
    }
}

Example: multiple roots with prefixes ​

If pages are split across directories, and each directory corresponds to a namespace prefix:

json
{
    "$schema": "https://laravel-ide.com/schema/laravel-ide-v2.json",
    "packages": {
        "inertia": {
            "pagePaths": [
                {
                    "path": "resources/inertiaPages/App",
                    "prefix": "App/"
                }
            ]
        }
    }
}

Page completions from the App directory will appear as App/Dashboard, App/Users/Index, etc.

Path resolution ​

Path values follow the same rules as other path fields in ide.json:

  • /resources/js/Pages — absolute from the project root.
  • resources/js/Pages — relative to the folder containing ide.json.
  • ../../resources/js/Pages — relative, two levels up from the folder containing ide.json.