-
Notifications
You must be signed in to change notification settings - Fork 172
/
vite.config.ts
34 lines (33 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
import { defineConfig, type Plugin } from 'vite';
import solid from 'vite-plugin-solid';
import mdx from '@mdx-js/rollup';
import rehypeHighlight from 'rehype-highlight';
import remarkGfm from 'remark-gfm';
import pckg from './package.json' assert { type: 'json' };
export default defineConfig({
define: {
__UPDATED_AT__: JSON.stringify(new Date().toLocaleString()),
__SOLID_VERSION__: JSON.stringify(pckg.dependencies['solid-js']),
},
plugins: [
{
...mdx({
jsx: true,
jsxImportSource: 'solid-js',
providerImportSource: 'solid-mdx',
remarkPlugins: [remarkGfm],
rehypePlugins: [rehypeHighlight],
}),
enforce: 'pre',
} as Plugin,
solid({ extensions: ['.md', '.mdx'] }),
// VitePWA(pwaOptions),
],
optimizeDeps: {
include: ['monaco-textmate', 'onigasm', 'monaco-editor-textmate'],
exclude: ['@solid.js/docs'],
},
build: {
target: 'esnext',
},
});