Files
vue-ts-example/src/main.ts
严浩 ad8ca857df
All checks were successful
CI / cache-and-install (push) Successful in 2m2s
chore: Update @unhead/vue import in main.ts
2024-08-21 14:41:37 +08:00

20 lines
532 B
TypeScript

import './assets/main.css';
import 'virtual:uno.css';
import { createApp } from 'vue';
import { createPinia } from 'pinia';
import { createHead } from '@unhead/vue';
import App from './App.vue';
import { router } from './router';
import { DataLoaderPlugin } from 'unplugin-vue-router/data-loaders';
createApp(App)
.use(createHead())
.use(createPinia())
// Register the plugin before the router
.use(DataLoaderPlugin, { router })
// adding the router will trigger the initial navigation
.use(router)
.mount('#app');