0.0.5 • Published 3 years ago

esbuild-svelte-inertia v0.0.5

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

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.