Skip to content

Conversation

pascalbaljet
Copy link
Member

This PR brings support for checking whether a component exists when sending it to the frontend using Inertia::render(). This idea was brought up in #272. It uses the same logic as that in the AssertableInertia class, but you can configure it separately from each other.

I think I would not enable this in production (though it's always enabled with Blade), but definitely in development. There's no clear indication on the frontend when you pass the wrong component, and I've been bitten by this a few times, so this would be a nice timesaver.

@chack1172
Copy link

@pascalbaljet I would get the value for config ensure_pages_exist from an env() for who wants to enable it only in development and not in production

@pascalbaljet
Copy link
Member Author

@pascalbaljet I would get the value for config ensure_pages_exist from an env() for who wants to enable it only in development and not in production

Good point, that also nicely aligns with the other config options. Added in 88d55d7

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.

View path errors result in impossible to debug frontend errors Check if page components exist

2 participants