This commit is contained in:
X1627315083@163.com
2026-05-14 13:08:29 +08:00
parent e54e66c6ae
commit 2ab2466f3d
9 changed files with 593 additions and 73 deletions

View File

@@ -3,11 +3,14 @@ import type { ViteSSGOptions } from 'vite-ssg'
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import generateSitemap from 'vite-ssg-sitemap'
import { fileURLToPath, URL } from 'node:url'
// https://vite.dev/config/
const config = {
base: '/',
plugins: [vue()],
plugins: [vue()
],
ssgOptions: {
dirStyle: 'nested',
script: 'defer',
@@ -21,7 +24,13 @@ const config = {
outDir: 'dist'
})
}
}
},
resolve: {
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url)),
_c: fileURLToPath(new URL('./src/components', import.meta.url))
}
},
} satisfies UserConfig & { ssgOptions: ViteSSGOptions }
export default defineConfig(config)