-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvite.docs.js
More file actions
45 lines (42 loc) · 1.07 KB
/
vite.docs.js
File metadata and controls
45 lines (42 loc) · 1.07 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
import { defineConfig } from 'vite'
import jsconfigPaths from 'vite-jsconfig-paths'
import svgr from 'vite-plugin-svgr'
import react from '@vitejs/plugin-react'
import define from './vite.defs.js'
import mdx from '@mdx-js/rollup'
import rehypeCodeProps from 'rehype-mdx-code-props'
import fs from 'node:fs'
const https = {
key: fs.readFileSync('etc/certs/badger-react-ui.local.wardley.org-key.pem'),
cert: fs.readFileSync('etc/certs/badger-react-ui.local.wardley.org.pem'),
}
export default defineConfig({
plugins: [
{
enforce: 'pre',
...mdx({
rehypePlugins: [rehypeCodeProps],
providerImportSource: '@mdx-js/react'
})
},
react({
include: /\.(jsx|mdx)$/
}),
svgr(),
jsconfigPaths({ root: '../' })
],
root: 'web',
base: '/badger-react-ui',
envDir: '../',
define,
build: {
emptyOutDir: true,
outDir: '../docs',
chunkSizeWarningLimit: 1800
},
server: {
host: 'badger-react-ui.local.wardley.org',
port: 3012,
https
}
})