Skip to content

Fix directory case mismatch for Inertia page resolution on case-sensitive systems #95

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

smnmsr
Copy link

@smnmsr smnmsr commented Apr 6, 2025

This PR addresses an issue where Inertia.js fails to locate page components on systems with case-sensitive file paths (e.g., Linux-based CI runners).

By default, Inertia.js expects pages to be located in the js/Pages directory, as defined in its config. However, the Laravel starter kit uses a lowercase js/pages folder instead.

This mismatch causes issues when using Inertia's component() testing functionality, which relies on correct path resolution and fails on case-sensitive environments like GitHub Actions.

Changes included

Alternatives considered

If the starter kit prefers keeping js/pages, two options are available:

  • Publish the Inertia config and override the root_view path.
  • Accept that the default setup won’t support Inertia's testing out of the box on case-sensitive systems.

@Plytas
Copy link

Plytas commented Apr 6, 2025

Just an FYI, there's already a PR regarding this #88 but looks like it doesn't have the change in SSR.

@smnmsr
Copy link
Author

smnmsr commented Apr 6, 2025

Just an FYI, there's already a PR regarding this #88 but looks like it doesn't have the change in SSR.

Oh, you're right. I didn't see it. Sorry. Should I close?

@tnylea
Copy link
Contributor

tnylea commented Apr 14, 2025

Thanks @smnmsr,

We are going to go ahead and publish the inertia config: #108. We may make lowercase pages the default in Inertia, but for now this will resolve those issues.

Appreciate it 👏

@tnylea tnylea closed this Apr 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants