in vuejs2 applications I created common mixin and referenced it in resources/js/app.js like :
require('./bootstrap');
import Vue from 'vue';
import common from "./common";
Vue.mixin(common);
But I failed to make similar in Laravel 8/Inertia.js 0.4/vuejs3 application :
import Vue from 'vue' // i got compile error : export 'default' (imported as 'Vue') was not found in 'vue'
// Vue = required('vue') // GOT RUN TIME ERROR : app.js:26221 Uncaught ReferenceError: required is not defined
import { createApp, h } from 'vue';
import { createInertiaApp } from '@inertiajs/inertia-vue3';
import { InertiaProgress } from '@inertiajs/progress';
import common from "./appMixin";
Vue.mixin(common);
How can I do it ? Also I used global Vue in many parts of application, like reading process env variables.
How can I do it in Inertia.js /vuejs app ?
Thanks!