-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathvite.config.ts
More file actions
30 lines (29 loc) · 974 Bytes
/
vite.config.ts
File metadata and controls
30 lines (29 loc) · 974 Bytes
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
import { reactRouter } from '@react-router/dev/vite';
import { defineConfig } from 'vite';
import mdx from '@mdx-js/rollup';
import remarkToc from 'remark-toc';
import remarkGfm from 'remark-gfm';
import rehypeHighlight from 'rehype-highlight';
import rehypeSanitize from 'rehype-sanitize';
import rehypeRaw from 'rehype-raw';
import rehypeSlug from 'rehype-slug';
import rehypeLink from './src/helpers/rehypeLink';
export default defineConfig({
// Allow CRA-style REACT_APP_* in .env alongside Vite's VITE_* (see src/api/prod/constant.ts).
envPrefix: ['VITE_', 'REACT_APP_'],
resolve: {
tsconfigPaths: true,
},
plugins: [
mdx({
providerImportSource: '/src/helpers/mdxComponents.tsx',
remarkPlugins: [remarkGfm, remarkToc],
rehypePlugins: [rehypeHighlight, rehypeSanitize, rehypeRaw, rehypeSlug, rehypeLink],
}),
reactRouter(),
],
optimizeDeps: {
include: ['react/jsx-runtime'],
},
// assetsInclude: ["**/*.md"],
});