forked from tnrich/ove-react-demo-repo
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvite.config.js
More file actions
43 lines (42 loc) · 1.06 KB
/
vite.config.js
File metadata and controls
43 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
import { defineConfig } from "vite"; // Add this import
import react from "@vitejs/plugin-react";
export default defineConfig({
// Wrap with defineConfig
base: "./",
plugins: [react()],
build: {
outDir: "dist",
// OVE/editor bundles are large by nature; keep warnings useful by raising this threshold.
chunkSizeWarningLimit: 3000,
rollupOptions: {
output: {
manualChunks(id) {
if (id.includes("@teselagen/ove")) {
return "ove";
}
if (id.includes("@teselagen/bio-parsers")) {
return "bio-parsers";
}
if (id.includes("@blueprintjs") || id.includes("@teselagen/ui")) {
return "ui-vendor";
}
if (id.includes("node_modules")) {
return "vendor";
}
}
}
}
},
optimizeDeps: {
esbuildOptions: {
loader: {
".js": "jsx"
}
}
},
define: {
// By default, Vite doesn't include shims for NodeJS/
// necessary for segment analytics lib to work
// global: {},
}
});