@nara-web/inertia-vue
v1.0.2
Published
Vue 3 + Inertia.js adapter for NARA
Downloads
67
Readme
@nara/inertia-vue
Vue 3 + Inertia.js adapter for the NARA framework.
Installation
npm install @nara/inertia-vue @inertiajs/vue3 vueUsage
Server-side
Register the Vue adapter in your NARA application:
// app/index.ts or server.ts
import { vueAdapter } from '@nara/inertia-vue';
const app = new Nara({
adapter: vueAdapter({
rootView: 'inertia.html',
}),
});Client-side
Initialize the Inertia app in your client entry point:
// resources/js/app.ts
import { initInertiaApp } from '@nara/inertia-vue';
initInertiaApp({
resolve: (name) => import(`./pages/${name}.vue`),
});Vite Configuration
Use the provided helper to configure Vite:
// vite.config.ts
import { defineConfig } from 'vite';
import { createViteConfig } from '@nara/inertia-vue';
export default defineConfig(
createViteConfig()
);License
MIT
