figure out router

This commit is contained in:
Rachel Lambda Samuelsson 2024-07-15 21:41:46 +02:00
parent 6cb0235ba5
commit 2cfc466efd
3 changed files with 11 additions and 5 deletions

3
src/components/Ex.vue Normal file
View File

@ -0,0 +1,3 @@
<template>
mjau mjau EXAMPLE
</template>

View File

@ -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 },
(() => {})
)

View File

@ -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))
}
}
})
}