-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vite.config.ts
35 lines (34 loc) · 955 Bytes
/
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
import { resolve } from "node:path";
import mdx from "@mdx-js/rollup";
import withToc from "@stefanprobst/rehype-extract-toc";
import withTocExport from "@stefanprobst/rehype-extract-toc/mdx";
import react from "@vitejs/plugin-react";
import withSlug from "rehype-slug";
import remarkGfm from "remark-gfm";
import tailwindcss from "tailwindcss";
import { defineConfig } from "vite";
import dynamicImport from "vite-plugin-dynamic-import";
// https://vitejs.dev/config/
export default defineConfig({
plugins: [
react(),
mdx({
rehypePlugins: [withSlug, withToc, withTocExport],
remarkPlugins: [remarkGfm],
}),
dynamicImport(),
],
css: {
postcss: {
plugins: [tailwindcss()],
},
},
resolve: {
alias: {
"@pswui": resolve(__dirname, "./src/pswui/components"),
"@": resolve(__dirname, "./src"),
"@pswui-lib": resolve(__dirname, "./src/pswui/lib"),
},
},
cacheDir: "./.vite",
});