-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathvite.config.ts
More file actions
36 lines (34 loc) · 927 Bytes
/
vite.config.ts
File metadata and controls
36 lines (34 loc) · 927 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
31
32
33
34
35
36
import react from "@vitejs/plugin-react-swc";
import { defineConfig } from "vite";
import tsconfigPaths from "vite-tsconfig-paths";
import copyMonacoEditor from "./plugins/copyMonacoEditor";
// https://vitejs.dev/config/
export default defineConfig({
server: {
port: 3001,
},
plugins: [react(), tsconfigPaths(), copyMonacoEditor()],
resolve: {
alias: {
react: "preact/compat",
"react-dom/test-utils": "preact/test-utils",
"react-dom": "preact/compat",
"react/jsx-runtime": "preact/jsx-runtime",
},
},
build: {
target: ["chrome95", "edge95", "esnext", "firefox95", "safari16"],
sourcemap: false,
rollupOptions: {
plugins: [],
output: {
sourcemap: false,
manualChunks: {
"rehype-parse": ["rehype-parse"],
"rehype-raw": ["rehype-raw"],
"react-markdown": ["react-markdown"],
},
},
},
},
});