-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvite.config.ts
More file actions
48 lines (45 loc) · 1.27 KB
/
vite.config.ts
File metadata and controls
48 lines (45 loc) · 1.27 KB
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
42
43
44
45
46
47
import react from '@vitejs/plugin-react';
import path from 'path';
import { fileURLToPath } from 'url';
import { defineConfig } from 'vite';
import mdx from '@mdx-js/rollup';
import rehypeAutolinkHeadings from 'rehype-autolink-headings';
import rehypeSlug from 'rehype-slug';
import remarkGfm from 'remark-gfm';
import contentCollectionsPlugin from '@content-collections/vite';
const __dirname = path.dirname(fileURLToPath(import.meta.url));
export default defineConfig({
plugins: [
react(),
mdx({
remarkPlugins: [remarkGfm] as any,
rehypePlugins: [
rehypeSlug as any,
[
rehypeAutolinkHeadings as any,
{
properties: {
className: ['anchor'],
},
},
],
],
}),
contentCollectionsPlugin({
configPath: './metadata.ts',
}),
],
resolve: {
alias: {
'@': path.resolve(__dirname, './src'),
'@components': path.resolve(__dirname, './src/components'),
'@data': path.resolve(__dirname, './data'),
'@lib': path.resolve(__dirname, './src/lib'),
'@assets': path.resolve(__dirname, './src/assets'),
'content-collections': path.resolve(__dirname, './.content-collections/generated'),
},
},
build: {
outDir: 'dist',
},
});