esbuild-svelte-inertia Svelte Themes

Esbuild Svelte Inertia

Esbuild Plugin for running Inertia with Svelte

ESBuild Svelte Inertia Plugin

This plugin enables importing all the pages component to pass it to resolve function of Inertia.

Installation

yarn add esbuild-svelte-inertia
# esbuild.config.js
const svelteInertiaPlugin = require("esbuild-svelte-inertia")

esbuid.build({
  ...
  plugins: [sveltePlugin(), svelteInertiaPlugin()],
})

Example usage

import * as pages from "./Pages/**/*"
createInertiaApp({
  resolve: name => pages[name.replace("/", "")],
  setup({ el, App, props }) {
    new App({ target: el, props })
  },
})

🙏 Contributing

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.

📝 License

The gem is available as open source under the terms of the MIT License.

Top categories

Loading Svelte Themes