inertia-laravel icon indicating copy to clipboard operation
inertia-laravel copied to clipboard

Add `views/pages` to the default testing page paths

Open innocenzi opened this issue 4 years ago • 0 comments

This PR adds the resources/views/pages path to the default testing page paths.

The reason for this is that I personally believe pages should be in the resources/views/pages directory instead of the resources/js/Pages one:

  • Having js as the main directory does not make much sense, as it is common to not have any JavaScript files
  • I dig the kebab-case convention (but this is compatible with camelCase too), inspired by codebases like Vite, Vue and the default Laravel blade one
  • I'm promoting this architecture with Laravel Vite, but I kept resources/js in the defaults too
  • My Inertia preset scaffolds this architecture as well

Note that this is just a convenience addition to avoid having to fix it up manually. It doesn't change the previous behavior and should not bring any false positives either.

  • Related: https://ninjaparadedigital.com/blog/inertia-js-testing-configurations

innocenzi avatar Jul 30 '21 11:07 innocenzi