forked from leanprover-community/lean4web
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvite.config.ts
46 lines (45 loc) · 974 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
35
36
37
38
39
40
41
42
43
44
45
46
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react-swc'
import { viteStaticCopy } from 'vite-plugin-static-copy'
import svgr from "vite-plugin-svgr"
// https://vitejs.dev/config/
export default defineConfig({
build: {
// Relative to the root
// Note: This has to match the path in `server/index.mjs` and in `tsconfig.json`
outDir: 'client/dist',
},
plugins: [
react(),
svgr({
svgrOptions: {
// svgr options
},
}),
viteStaticCopy({
targets: [
{
src: 'node_modules/@leanprover/infoview/dist/*.production.min.js',
dest: '.'
}
]
})],
publicDir: "client/public",
server: {
port: 3000,
proxy: {
'/websocket': {
target: 'ws://localhost:8080',
ws: true
},
'/examples': {
target: 'http://localhost:8080',
},
}
},
resolve: {
alias: {
path: "path-browserify",
},
},
})