You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm wondering if it would be possible to use Vite's glob imports to auto import the relevant pages/*.imba file as documented in the Svelte example? Eg:
const pages = import.meta.glob('../pages/**/*.svelte')
createInertiaApp({
resolve: name=>pages[`../pages/${name}.svelte`](),
setup({ el, App, props }) {
newApp({ target: el, props })
},
})
This would save having to manually import each imba page file. Not sure if it's possible using the current way createInertiaApp resolves...
If not, it's not a huge deal to create a pages/index.imba file and to import each page there and then include it in the entry file bit might be one less step!
The text was updated successfully, but these errors were encountered:
Taking a look at Vite docs, it's possible to use glob imports with the eager setting set to true, this will fully import the global tags (in my case loading layouts and pages)
I'm wondering if it would be possible to use Vite's glob imports to auto import the relevant
pages/*.imba
file as documented in the Svelte example? Eg:This would save having to manually import each imba page file. Not sure if it's possible using the current way
createInertiaApp
resolves...If not, it's not a huge deal to create a
pages/index.imba
file and to import each page there and then include it in the entry file bit might be one less step!The text was updated successfully, but these errors were encountered: