blog-vue/vite.config.ts
2024-07-16 01:35:09 +02:00

33 lines
620 B
TypeScript

import { fileURLToPath, URL } from 'node:url'
import Vue from '@vitejs/plugin-vue'
import Pages from 'vite-plugin-pages'
import Markdown from 'unplugin-vue-markdown/vite'
import mk from '@vscode/markdown-it-katex'
export default {
plugins: [
Vue({
include: [/\.vue$/, /\.md$/],
}),
Pages(),
Markdown({
headEnabled: true,
markdownItSetup(md) {
// @ts-ignore
md.use(mk.default)
}
})
],
resolve: {
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url))
}
},
esbuild: {
supported: {
'top-level-await': true
},
}
}