feat: replace vite-plugin-pages by unplugin-vue-router (#43)
This commit is contained in:
1 parent
a512b60f88
commit
a9a8f12307
10 files changed
+208
-179
No files matched your search
+1
-3
@@ -1,6 +1,5 @@
|
||||
import { createApp } from 'vue'
|
||||
import { createRouter, createWebHistory } from 'vue-router'
|
||||
import routes from 'virtual:generated-pages'
|
||||
import { createRouter, createWebHistory } from 'vue-router/auto'
|
||||
import App from './App.vue'
|
||||
|
||||
import '@unocss/reset/tailwind.css'
|
||||
@@ -10,7 +9,6 @@ import 'uno.css'
|
||||
const app = createApp(App)
|
||||
const router = createRouter({
|
||||
history: createWebHistory(import.meta.env.BASE_URL),
|
||||
routes,
|
||||
})
|
||||
app.use(router)
|
||||
app.mount('#app')
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
## File-based Routing
|
||||
|
||||
Routes will be auto-generated for Vue files in this dir with the same file structure.
|
||||
Check out [`vite-plugin-pages`](https://github.com/hannoeru/vite-plugin-pages) for more details.
|
||||
Check out [`unplugin-vue-router`](https://github.com/posva/unplugin-vue-router) for more details.
|
||||
|
||||
### Path Aliasing
|
||||
|
||||
|
||||
Reference in new issue
Block a user