usingInertiaJS flag on Application #5072
ThisIsMissEm
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
As a package developer, it's helpful to be able to detect your package is being used with Inertia vs Edge.js, right now, there's flags for
usingEdgeJSandusingVineJS, but nothing for indicating if Inertia.js is in use.The reason you might want to know this is to generate correct stubs, for instance, if you do a redirect, you likely want
inertia.location(url)instead ofresponse.redirect().toPath(url), or you might want to generate views for the correct engine.It may also need to be an object, indicating if react or vue is being used, not just if inertia in general is being used or not.
Right now I detect this by checking if
config/inertia.tsexists, which isn't fantastic but does work.Beta Was this translation helpful? Give feedback.
All reactions