figure out router
This commit is contained in:
parent
6cb0235ba5
commit
2cfc466efd
3
src/components/Ex.vue
Normal file
3
src/components/Ex.vue
Normal file
|
@ -0,0 +1,3 @@
|
|||
<template>
|
||||
mjau mjau EXAMPLE
|
||||
</template>
|
|
@ -4,9 +4,14 @@ import { ViteSSG } from 'vite-ssg'
|
|||
import routes from '~pages'
|
||||
|
||||
import App from './App.vue'
|
||||
import Ex from './components/Ex.vue'
|
||||
|
||||
const allRoutes = routes.concat([
|
||||
{ path: '/blog/mjau', component: Ex },
|
||||
])
|
||||
|
||||
export const createApp = ViteSSG(
|
||||
App,
|
||||
{ routes },
|
||||
{ routes: allRoutes },
|
||||
(() => {})
|
||||
)
|
||||
|
|
|
@ -1,11 +1,9 @@
|
|||
import { fileURLToPath, URL } from 'node:url'
|
||||
|
||||
import { defineConfig } from 'vite'
|
||||
import vue from '@vitejs/plugin-vue'
|
||||
import Pages from 'vite-plugin-pages'
|
||||
|
||||
// https://vitejs.dev/config/
|
||||
export default defineConfig({
|
||||
export default {
|
||||
plugins: [
|
||||
vue(),
|
||||
Pages()
|
||||
|
@ -15,4 +13,4 @@ export default defineConfig({
|
|||
'@': fileURLToPath(new URL('./src', import.meta.url))
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user