From 59d92d6021a8a4a5763b39336f2c944f5c5960d9 Mon Sep 17 00:00:00 2001 From: N1ebieski Date: Mon, 21 Jul 2025 18:22:54 +0000 Subject: [PATCH] Add support for root Inertia configs Fixes N1ebieski/vs-code-extension#49 --- php-templates/inertia.php | 4 ++-- src/templates/inertia.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/php-templates/inertia.php b/php-templates/inertia.php index d1a51fc8..deb0d318 100644 --- a/php-templates/inertia.php +++ b/php-templates/inertia.php @@ -1,8 +1,8 @@ collect(config('inertia.testing.page_paths', []))->flatMap(function($path) { + 'page_extensions' => config('inertia.page_extensions', config('inertia.testing.page_extensions', [])), + 'page_paths' => collect(config('inertia.page_paths', config('inertia.testing.page_paths', [])))->flatMap(function($path) { $relativePath = LaravelVsCode::relativePath($path); return [$relativePath, mb_strtolower($relativePath)]; diff --git a/src/templates/inertia.ts b/src/templates/inertia.ts index 072b8d13..460f91d0 100644 --- a/src/templates/inertia.ts +++ b/src/templates/inertia.ts @@ -1,8 +1,8 @@ // This file was generated from php-templates/inertia.php, do not edit directly export default ` echo json_encode([ - ...config('inertia.testing', []), - 'page_paths' => collect(config('inertia.testing.page_paths', []))->flatMap(function($path) { + 'page_extensions' => config('inertia.page_extensions', config('inertia.testing.page_extensions', [])), + 'page_paths' => collect(config('inertia.page_paths', config('inertia.testing.page_paths', [])))->flatMap(function($path) { $relativePath = LaravelVsCode::relativePath($path); return [$relativePath, mb_strtolower($relativePath)];