49 lines
1.6 KiB
JavaScript
49 lines
1.6 KiB
JavaScript
import { createApp, h } from 'vue'
|
|
import { createInertiaApp } from '@inertiajs/vue3'
|
|
import {createPinia} from "pinia";
|
|
import {setupNaiveDiscreteApi} from "./Plugins/NaiveUI.js";
|
|
import * as Sentry from "@sentry/vue";
|
|
import './bootstrap';
|
|
import '../css/app.css';
|
|
|
|
|
|
createInertiaApp({
|
|
id: 'onboard',
|
|
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)
|
|
|
|
// Sentry.init({
|
|
// vueApp,
|
|
// dsn: import.meta.env.VITE_SENTRY_DNS,
|
|
// // Setting this option to true will send default PII data to Sentry.
|
|
// // For example, automatic IP address collection on events
|
|
// sendDefaultPii: true,
|
|
// integrations: [
|
|
// Sentry.replayIntegration()
|
|
// ],
|
|
// // Session Replay
|
|
// replaysSessionSampleRate: 0, // This sets the sample rate at 10%. You may want to change it to 100% while in development and then sample at a lower rate in production.
|
|
// replaysOnErrorSampleRate: 0.5, // If you're not already sampling the entire session, change the sample rate to 100% when sampling sessions where errors occur.,
|
|
// // Logs
|
|
// enableLogs: true
|
|
// });
|
|
|
|
vueApp.mount(el)
|
|
},
|
|
}).then(r => {
|
|
console.log('Инициализация прошла успешно')
|
|
})
|