This plugin enables importing all the pages component to pass it to resolve function of Inertia.
yarn add esbuild-svelte-inertia
# esbuild.config.js
const svelteInertiaPlugin = require("esbuild-svelte-inertia")
esbuid.build({
...
plugins: [sveltePlugin(), svelteInertiaPlugin()],
})
import * as pages from "./Pages/**/*"
createInertiaApp({
resolve: name => pages[name.replace("/", "")],
setup({ el, App, props }) {
new App({ target: el, props })
},
})
If you have an issue you'd like to submit, please do so using the issue tracker in GitHub. In order for us to help you in the best way possible, please be as detailed as you can.
The gem is available as open source under the terms of the MIT License.