forked from openrecall/openrecall
-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathvite.config.ts
More file actions
31 lines (30 loc) · 728 Bytes
/
vite.config.ts
File metadata and controls
31 lines (30 loc) · 728 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
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
import tsconfigPaths from "vite-tsconfig-paths";
import { join } from "path";
import { chunkSplitPlugin } from "vite-plugin-chunk-split";
// https://vite.dev/config/
export default defineConfig({
root: join(__dirname, "src/renderer"),
build: {
outDir: join(__dirname, "dist/renderer"),
emptyOutDir: true
},
plugins: [
react(),
tsconfigPaths(),
chunkSplitPlugin({
strategy: "single-vendor",
customChunk: (args) => {
// files into pages directory is export in single files
const { id } = args;
if (id.includes("node_modules")) {
return "vendor";
} else {
return "main";
}
}
})
],
base: ""
});