Home > Enterprise >  How to use Vuetify in Laravel 9 Vue SPA?
How to use Vuetify in Laravel 9 Vue SPA?

Time:06-08

I just wanted to add vuetify to my app, but after installing packages and setting up resources\js\app.js I have error at the runtime:

Uncaught TypeError: vue__WEBPACK_IMPORTED_MODULE_0___default.a is undefined

This is my resources\js\app.js

import Alpine from 'alpinejs';
import { createApp } from 'vue';
import router from './router'
import { createPinia } from 'pinia'
import Vuetify from 'vuetify'
import UserName from './components/layout/UserName.vue'
import NavigationLinks from './components/layout/NavigationLinks.vue'

require('./bootstrap');

createApp({
    vuetify: new Vuetify(),
    components: {
        UserName,
        NavigationLinks,
    }
})
.use(createPinia())
.use(router)
.use(Vuetify)
.mount('#app')

window.Alpine = Alpine;
Alpine.start();

In docs I see import Vue from 'vue' But it getting me an error, I use createApp What am I doing wrong? Vue 3, Vuetify 2.6, Laravel 9

CodePudding user response:

Maybe because Vuetify doesn't suport Vue3 yet

  • Related