-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vite.config.ts
40 lines (38 loc) · 1.03 KB
/
vite.config.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
import { defineConfig } from "vite";
import vue from "@vitejs/plugin-vue";
import Markdown, { meta } from "vite-plugin-md";
import Layouts from "vite-plugin-vue-layouts";
import legacy from "@vitejs/plugin-legacy";
import pages from "vite-plugin-pages";
import unocss from "unocss/vite";
import yaml from "vite-plugin-yaml2";
import apply from "@unocss/transformer-directives";
import generateSitemap from "vite-plugin-pages-sitemap";
import Prism from "markdown-it-prism";
const hostname = "http://localhost:3000/";
// https://vitejs.dev/config/
export default defineConfig({
plugins: [
yaml(),
unocss({
transformers: [apply()],
}),
legacy(),
vue({
include: [/\.vue$/, /\.md$/], // <--
}),
pages({
onRoutesGenerated: (routes) => generateSitemap({ routes, hostname }),
extensions: ["vue", "md"],
}),
Markdown({
headEnabled: true,
builders: [meta()],
markdownItSetup(md) {
// https://prismjs.com/
md.use(Prism);
},
}),
Layouts(),
],
});