inertia-vue3@v0.1.0

Published on October 9, 2020

This is the initial release of the new @inertiajs/inertia-vue3 adapter. 🎉

How to install

npm install @inertiajs/inertia @inertiajs/inertia-vue3
yarn add @inertiajs/inertia @inertiajs/inertia-vue3
  • This adapter requires version 0.4.0 of the @inertiajs/inertia package.
  • Vue 3 isn't supported in Laravel Mix 5. You'll need to use Laravel Mix 6 (currently in alpha).

How to setup

import { createApp, h } from 'vue'
import { app, plugin } from '@inertiajs/inertia-vue3'

const el = document.getElementById('app')

createApp({
  render: () =>
    h(app, {
      initialPage: JSON.parse(el.dataset.page),
      resolveComponent: (name) => import(`@/Pages/${name}`).then((module) => module.default),
    }),
})
  .use(plugin)
  .mount(el)