48 lines
1.4 KiB
JavaScript
48 lines
1.4 KiB
JavaScript
import { createApp } from 'vue';
|
|
import 'bootstrap/dist/js/bootstrap';
|
|
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate';
|
|
import { useMainStore } from '@/store';
|
|
import baseMixin from '@/mixins/base-mixin';
|
|
import { createPinia } from 'pinia';
|
|
import Maska from 'maska';
|
|
import LoadScript from 'vue-plugin-load-script';
|
|
|
|
import analyticsMixin from '@/mixins/analytics-mixin';
|
|
import experimentMixin from '@/mixins/experiment-mixin';
|
|
import defineGlobalRules from '@/helpers/global-rule-definer';
|
|
import router from './router';
|
|
import App from './App.vue';
|
|
|
|
// Vue App Setup
|
|
const vueApp = createApp(App);
|
|
|
|
/**
|
|
* Needed to make injections reactively linked to the provider.
|
|
* This is not needed once Vue.js is in version 3.3
|
|
* https://vuejs.org/guide/components/provide-inject.html#working-with-reactivity
|
|
*/
|
|
vueApp.config.unwrapInjectedRef = true;
|
|
|
|
vueApp.config.compilerOptions.isCustomElement = (tag) =>
|
|
(tag === 'siteSubHeader'
|
|
|| tag === 'ServicePackages'
|
|
|| tag === 'servicePackageQuestion');
|
|
|
|
// Pinia
|
|
const pinia = createPinia();
|
|
vueApp.use(pinia);
|
|
pinia.use(piniaPluginPersistedstate);
|
|
useMainStore().populateInitialState();
|
|
|
|
// Additional Vue items to setup
|
|
vueApp.use(router);
|
|
vueApp.use(Maska);
|
|
vueApp.use(LoadScript);
|
|
vueApp.mixin(baseMixin);
|
|
vueApp.mixin(analyticsMixin);
|
|
vueApp.mixin(experimentMixin);
|
|
|
|
vueApp.mount('#app');
|
|
|
|
// define global rules
|
|
defineGlobalRules();
|