Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

MUM's avatar
Level 4

Integration of Quasar 2 in Laravel Jetstream project fails

Unfortunately, I'm not getting any further with my problem at the moment and hope that someone has one or two helpful hints for me!

I would like to use the Quasar Framework in a project. The project was completely rebuilt with curl -s https://laravel.build/laravel-one | bash. Then I followed the instructions on https://jetstream.laravel.com/2.x/installation.html and installed Jetstream with Inertia. This works without any problems, I can call up the page in the internet browser and everything works. Next, I installed the necessary components for Quasar with npm install quasar@next and npm install quasar-extras@next. I then edited the app.js and adapted it as follows:

require('./bootstrap');

// Import modules...
import { createApp, h } from 'vue';
import { App as InertiaApp, plugin as InertiaPlugin } from '@inertiajs/inertia-vue3';
import { Quasar } from 'quasar';

const el = document.getElementById('app');

const app = createApp({
    render: () =>
        h(InertiaApp, {
            initialPage: JSON.parse(el.dataset.page),
            resolveComponent: (name) => require(`./Pages/${name}`).default,
        }),
})
    .mixin({ methods: { route } })
    .use(InertiaPlugin, Quasar);

app.mount(el);

If I then insert a button with <q-btn colour="white" text-color="black" label="Standard" /> in the Welcome.vue file, for example, I get the message Failed to resolve component: q-btn in the JavaScript console.

From another project, still with Vue2, I know that the following setup worked with Quasar:

app.js

require('./bootstrap');
require('../css/app.css');

import { Inertia } from '@inertiajs/inertia';
import { App, plugin } from '@inertiajs/inertia-vue';
import Vue from 'vue';
import './Plugins/Quasar';

Vue.use(plugin);

const app = document.getElementById('app');

new Vue({
    store: store,
    render: h => h(App, {
        props: {
            initialPage: JSON.parse(app.dataset.page),
            resolveComponent: name => require(`./Pages/${name}`).default,
        },
    }),
}).$mount(app);

Quasar Plugin:

/**
 * Imports Quasar + styles
 */

require('quasar-extras/fontawesome');

import Vue from 'vue';
import iconSet from 'quasar/icon-set/fontawesome-v5';
import Quasar, {
    colours,
    dialogue,
    Notify,
    QBtn,
    QBanner,
} from 'quasar';

Vue.use(Quasar, {
    components: {
        QBanner,
        QBtn
    },
    plugins: {
        dialogue,
        Notify,
    },
    config: {
        notify: {},
    },
    iconSet: iconSet
});

Does anyone have an idea what the correct port would look like to make it work?

I think I did something wrong with my port to Vue3 or?

0 likes
1 reply
chermus's avatar

Hi,

I do not know if you got it working... but yesterday I implemented it. The only thing I could not get to work is the QItem to go to an router address or any address.

app.js

require('./bootstrap');

// Import modules...
import { createApp, h } from 'vue';
import { App as InertiaApp, plugin as InertiaPlugin } from '@inertiajs/inertia-vue3';
import { InertiaProgress } from '@inertiajs/progress';
import { Quasar } from 'quasar'
import quasarUserOptions from './quasar-user-options'


let timeout = null
const el = document.getElementById('app');

createApp({
    render: () =>
        h(InertiaApp, {
            initialPage: JSON.parse(el.dataset.page),
            resolveComponent: name => import(`@/Pages/${name}`).then(m => m.default),
        }),
})
    .mixin({ methods: {
            route: window.route,
            title: title => `intelliDOC- ${title}`,
        }})
    .use(InertiaPlugin)
    .use(Quasar)
    // .use(Notify)
    .mount(el);

InertiaProgress.init({ color: '#1DB24B', showSpinner: true });

quasar-user-options


import '../styles/quasar.sass'
import '@quasar/extras/material-icons/material-icons.css'
import '@quasar/extras/fontawesome-v5/fontawesome-v5.css'

// To be used on app.use(Quasar, { ... })
export default {
  config: {},
  plugins: {
  }
}

package.json

    "@quasar/extras": "^1.0.0",
    "quasar": "^2.0.0-beta.16",
1 like

Please or to participate in this conversation.