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 routes from '~pages'
|
||||||
|
|
||||||
import App from './App.vue'
|
import App from './App.vue'
|
||||||
|
import Ex from './components/Ex.vue'
|
||||||
|
|
||||||
|
const allRoutes = routes.concat([
|
||||||
|
{ path: '/blog/mjau', component: Ex },
|
||||||
|
])
|
||||||
|
|
||||||
export const createApp = ViteSSG(
|
export const createApp = ViteSSG(
|
||||||
App,
|
App,
|
||||||
{ routes },
|
{ routes: allRoutes },
|
||||||
(() => {})
|
(() => {})
|
||||||
)
|
)
|
||||||
|
|
|
@ -1,11 +1,9 @@
|
||||||
import { fileURLToPath, URL } from 'node:url'
|
import { fileURLToPath, URL } from 'node:url'
|
||||||
|
|
||||||
import { defineConfig } from 'vite'
|
|
||||||
import vue from '@vitejs/plugin-vue'
|
import vue from '@vitejs/plugin-vue'
|
||||||
import Pages from 'vite-plugin-pages'
|
import Pages from 'vite-plugin-pages'
|
||||||
|
|
||||||
// https://vitejs.dev/config/
|
export default {
|
||||||
export default defineConfig({
|
|
||||||
plugins: [
|
plugins: [
|
||||||
vue(),
|
vue(),
|
||||||
Pages()
|
Pages()
|
||||||
|
@ -15,4 +13,4 @@ export default defineConfig({
|
||||||
'@': fileURLToPath(new URL('./src', import.meta.url))
|
'@': fileURLToPath(new URL('./src', import.meta.url))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user