esbuild-svelte-inertia

0.0.5 • Public • Published

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.

Dependents (1)

Package Sidebar

Install

npm i esbuild-svelte-inertia

Weekly Downloads

44

Version

0.0.5

License

MIT

Unpacked Size

3.77 kB

Total Files

4

Last publish

Collaborators

  • bilalbudhani