-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
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 }) {
new App({ 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!
Metadata
Metadata
Assignees
Labels
No labels