File tree Expand file tree Collapse file tree 2 files changed +29
-8
lines changed Expand file tree Collapse file tree 2 files changed +29
-8
lines changed Original file line number Diff line number Diff line change 36
36
| Pages
37
37
|--------------------------------------------------------------------------
38
38
|
39
- | If you want to ensure that the pages exist, you can set `ensure_pages_exist` to true.
40
- | This will throw an exception if the component does not exist on the filesystem
41
- | when rendering a page. You may configure this separately for testing.
39
+ | Set `ensure_pages_exist` to true if you want to enforce that Inertia page
40
+ | components exist on disk when rendering a page. This is useful for
41
+ | catching missing or misnamed components.
42
+ |
43
+ | The `page_paths` and `page_extensions` options define where to look
44
+ | for page components and which file extensions to consider.
45
+ |
42
46
|
43
47
*/
44
48
71
75
| attempts to locate the component as a file relative to any of the
72
76
| paths AND with any of the extensions specified here.
73
77
|
74
- | By default, it uses the `page_paths` and `page_extensions` settings
75
- | defined above. You may override these values for testing purposes
76
- | by adding these two keys to this ` testing` array .
78
+ | Note: In a future release, the `page_paths` and `page_extensions`
79
+ | options below will be removed. The root-level options above
80
+ | will be used for both application and testing purposes .
77
81
|
78
82
*/
79
83
80
84
'testing ' => [
81
85
82
86
'ensure_pages_exist ' => true ,
83
87
88
+ 'page_paths ' => [
89
+
90
+ resource_path ('js/Pages ' ),
91
+
92
+ ],
93
+
94
+ 'page_extensions ' => [
95
+
96
+ 'js ' ,
97
+ 'jsx ' ,
98
+ 'svelte ' ,
99
+ 'ts ' ,
100
+ 'tsx ' ,
101
+ 'vue ' ,
102
+
103
+ ],
104
+
84
105
],
85
106
86
107
'history ' => [
Original file line number Diff line number Diff line change @@ -43,8 +43,8 @@ public function register(): void
43
43
$ this ->app ->bind ('inertia.testing.view-finder ' , function ($ app ) {
44
44
return new FileViewFinder (
45
45
$ app ['files ' ],
46
- $ app ['config ' ]->get ('inertia.testing.page_paths ' , fn () => $ app [ ' config ' ]-> get ( ' inertia.page_paths ' ) ),
47
- $ app ['config ' ]->get ('inertia.testing.page_extensions ' , fn () => $ app [ ' config ' ]-> get ( ' inertia.page_extensions ' ) )
46
+ $ app ['config ' ]->get ('inertia.testing.page_paths ' ),
47
+ $ app ['config ' ]->get ('inertia.testing.page_extensions ' )
48
48
);
49
49
});
50
50
}
You can’t perform that action at this time.
0 commit comments