-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathvite.config.ts
More file actions
41 lines (38 loc) · 840 Bytes
/
Copy pathvite.config.ts
File metadata and controls
41 lines (38 loc) · 840 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
37
38
39
40
41
import { createRequire } from "node:module";
import { defineConfig } from "vite";
const require = createRequire(import.meta.url);
const packageJson = require("./package.json");
const host = process.env.TAURI_DEV_HOST;
const devHost = host || "127.0.0.1";
export default defineConfig(async () => ({
root: "src",
clearScreen: false,
define: {
__APP_VERSION__: JSON.stringify(packageJson.version),
},
server: {
port: 1420,
strictPort: true,
host: devHost,
hmr: host
? {
protocol: "ws",
host,
port: 1421,
}
: undefined,
watch: {
ignored: ["**/src-tauri/**"],
},
},
build: {
outDir: "../dist",
emptyOutDir: true,
rollupOptions: {
input: {
main: "src/index.html",
cps: "src/cps.html",
},
},
},
}));