forked from esphome/esp-web-tools
-
Notifications
You must be signed in to change notification settings - Fork 1
/
vite.config.ts
33 lines (31 loc) · 990 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
import { defineConfig } from "vite";
export default defineConfig({
base: "https://paretosecurity.github.io/sms2slack-configure/",
optimizeDeps: {
include: ['esptool-js']
},
build: {
commonjsOptions: {
include: [/esptool-js/, /node_modules/]
},
rollupOptions: {
output: {
manualChunks(id) {
console.log(id)
if (id.includes("node_modules")) {
if (id.includes("@material")) {
return "mui";
}
if (id.includes("lit")) {
return "lit";
}
if (id.includes("esptool-js")) {
return "esptool";
}
return "vendor"; // all other package goes here
}
}
}
}
}
});