docs(vue): add vue-router in installation sections

Related to #2764
This commit is contained in:
Benjamin Canac
2025-01-10 13:06:59 +01:00
parent 85b8553893
commit 046785359e
3 changed files with 32 additions and 4 deletions

View File

@@ -74,11 +74,18 @@ export default defineConfig({
```ts [main.ts]
import { createApp } from 'vue'
import { createRouter, createWebHistory } from 'vue-router'
import ui from '@nuxt/ui/vue-plugin'
import App from './App.vue'
const app = createApp(App)
const router = createRouter({
routes: [],
history: createWebHistory()
})
app.use(router)
app.use(ui)
app.mount('#app')