-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathvite.config.ts
More file actions
46 lines (42 loc) · 1.06 KB
/
vite.config.ts
File metadata and controls
46 lines (42 loc) · 1.06 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
45
46
import {defineConfig} from "vite";
import mkcert from "vite-plugin-mkcert";
import react from "@vitejs/plugin-react";
import tsconfigPaths from "vite-tsconfig-paths";
import zipPack from "vite-plugin-zip-pack";
import path from "path";
const cwd = process.cwd();
export default defineConfig({
base: "./",
publicDir: path.join(cwd, "public"),
root: path.join(cwd, "source"),
build: {
emptyOutDir: true,
rollupOptions: {
input: {
config: path.join(cwd, "source/config.html"),
panel: path.join(cwd, "source/panel.html"),
mobile: path.join(cwd, "source/mobile.html"),
video_overlay: path.join(cwd, "source/video_overlay.html"),
video_component: path.join(cwd, "source/video_component.html"),
},
output: {
dir: path.join(cwd, "dist"),
},
},
},
server: {
port: 8080,
strictPort: true,
},
plugins: [
mkcert(),
react(),
tsconfigPaths({
root: cwd,
}),
zipPack({
inDir: path.join(cwd, "dist"),
outDir: path.join(cwd, "dist"),
}),
],
});