-
Notifications
You must be signed in to change notification settings - Fork 0
/
vite.config.ts
41 lines (40 loc) · 988 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
36
37
38
39
40
41
/** @type {import('vite').UserConfig} */
import { rezact } from "@rezact/rezact/vite-plugin";
import { rezact_mdx } from "@rezact/rezact/vite-mdx-plugin";
import remarkFrontmatter from "remark-frontmatter";
import remarkMdxFrontmatter from "remark-mdx-frontmatter";
import rehypeHighlight from "rehype-highlight";
import mdx from "@mdx-js/rollup";
export default {
resolve: {
alias: {
src: "/src",
rezact: "@rezact/rezact",
},
},
build: {
target: "esnext",
modulePreload: {
polyfill: false,
},
},
esbuild: {
jsxFactory: "xCreateElement",
jsxFragment: "xFragment",
},
plugins: [
mdx({
pragma: "r.xCreateElement",
pragmaFrag: "r.xFragment",
jsxRuntime: "classic",
pragmaImportSource: "src/lib/rezact/mdx",
remarkPlugins: [
remarkFrontmatter,
[remarkMdxFrontmatter, { name: "fm" }],
],
rehypePlugins: [rehypeHighlight],
}),
rezact(),
rezact_mdx(),
],
};