-
Notifications
You must be signed in to change notification settings - Fork 0
/
vite.config.ts
36 lines (34 loc) · 1.33 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
/// <reference types="vitest" />
import pages from '@hono/vite-cloudflare-pages'
import adapter from '@hono/vite-dev-server/cloudflare'
import honox from 'honox/vite'
import ssg from '@hono/vite-ssg'
import mdx from '@mdx-js/rollup';
import remarkBreaks from 'remark-breaks';
import remarkFrontmatter from 'remark-frontmatter';
import remarkMdxFrontmatter from 'remark-mdx-frontmatter';
import remarkGfm from 'remark-gfm'
import { rehypeMomiji } from './app/packages/rehype-momiji'
import { remarkMomijiTitle } from './app/packages/remark-momiji-title'
import rehypeMermaid from './app/packages/rehype-mermaid/rehypeMermaid'
import { remarkAttentionBlock } from './app/packages/remark-attention-block'
import { rehypeAttentionBlock } from './app/packages/rehype-attention-block'
import { defineConfig } from "vitest/config"
export default defineConfig({
build: {
emptyOutDir: false,
},
test: {
globals: true,
},
plugins: [
honox({ devServer: { adapter } }),
pages(),
ssg({ entry: "./app/server.ts" }),
mdx({
jsxImportSource: 'hono/jsx',
remarkPlugins: [remarkGfm, remarkBreaks, remarkFrontmatter, remarkMdxFrontmatter, remarkMomijiTitle, remarkAttentionBlock],
rehypePlugins: [[rehypeMomiji, { excludeLangs: ['mermaid'] }], rehypeMermaid, rehypeAttentionBlock],
})
],
})