-
Notifications
You must be signed in to change notification settings - Fork 8
/
vite.config.ts
44 lines (43 loc) · 1012 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
import { defineConfig } from "vite";
import { comlink } from "vite-plugin-comlink";
import react from "@vitejs/plugin-react-swc";
// https://vitejs.dev/config/
export default defineConfig({
plugins: [react()],
define: {
APP_VERSION: JSON.stringify(require("./package.json").version),
},
server: {
hmr: {
overlay: false,
},
port: 3000,
host: true,
proxy: {
"/socket.io": {
target: "http://localhost:3001",
changeOrigin: false,
secure: false,
ws: true,
},
"/api": {
target: "http://localhost:3001",
changeOrigin: false,
secure: false,
ws: true,
},
},
},
worker: {
format: "es",
},
build: {
manifest: true,
rollupOptions: {
external: ["src/services/imageActions/nodeImageActions.ts", "@napi-rs/canvas"],
plugins: [],
},
outDir: "./build",
target: ["chrome89", "edge89", "safari15", "firefox89"], // supports top_level_await & wasm
},
});