blog-vue/vite.config.ts

33 lines
620 B
TypeScript
Raw Normal View History

2024-07-13 22:37:36 +02:00
import { fileURLToPath, URL } from 'node:url'
2024-07-16 01:14:04 +02:00
import Vue from '@vitejs/plugin-vue'
2024-07-15 20:19:43 +02:00
import Pages from 'vite-plugin-pages'
2024-07-16 01:14:04 +02:00
import Markdown from 'unplugin-vue-markdown/vite'
2024-07-16 01:35:09 +02:00
import mk from '@vscode/markdown-it-katex'
2024-07-13 22:37:36 +02:00
2024-07-15 21:41:46 +02:00
export default {
2024-07-13 22:37:36 +02:00
plugins: [
2024-07-16 01:14:04 +02:00
Vue({
include: [/\.vue$/, /\.md$/],
}),
Pages(),
Markdown({
headEnabled: true,
markdownItSetup(md) {
2024-07-16 01:35:09 +02:00
// @ts-ignore
md.use(mk.default)
2024-07-16 01:14:04 +02:00
}
})
2024-07-13 22:37:36 +02:00
],
resolve: {
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url))
}
2024-07-16 01:14:04 +02:00
},
esbuild: {
supported: {
'top-level-await': true
},
2024-07-13 22:37:36 +02:00
}
2024-07-15 21:41:46 +02:00
}