29 lines
774 B
JavaScript
29 lines
774 B
JavaScript
import './bootstrap';
|
|
import '../css/app.css';
|
|
import { createApp, h } from 'vue'
|
|
import { createInertiaApp } from '@inertiajs/vue3'
|
|
import {createPinia} from "pinia";
|
|
import {setupNaiveDiscreteApi} from "./Plugins/naiveUI.js";
|
|
|
|
createInertiaApp({
|
|
id: 'kartoteka',
|
|
resolve: name => {
|
|
const pages = import.meta.glob('./Pages/**/*.vue', {eager: true})
|
|
return pages[`./Pages/${name}.vue`]
|
|
},
|
|
setup({el, App, props, plugin}) {
|
|
const vueApp = createApp({render: () => h(App, props)})
|
|
|
|
const pinia = createPinia()
|
|
|
|
vueApp.use(plugin)
|
|
vueApp.use(pinia)
|
|
|
|
setupNaiveDiscreteApi(vueApp)
|
|
|
|
vueApp.mount(el)
|
|
},
|
|
}).then(r => {
|
|
console.log('Инициализация прошла успешно')
|
|
})
|