-
Notifications
You must be signed in to change notification settings - Fork 25
Expand file tree
/
Copy pathvite.config.js
More file actions
29 lines (28 loc) · 830 Bytes
/
vite.config.js
File metadata and controls
29 lines (28 loc) · 830 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
const { defineConfig } = require("vite");
const { resolve } = require("path");
module.exports = defineConfig(({ command }) => {
if (command === "serve") {
return {
// dev specific config
define: {
CSS_FILE_NAME: JSON.stringify("parent-style.css"),
},
};
} else {
return {
// build specific config
build: {
rollupOptions: {
input: {
main: resolve(__dirname, "chatterbox.html"),
parent: resolve(__dirname, "index.html"),
},
},
outDir: "./target",
target: "esnext",
assetsInlineLimit: 0,
manifest: true,
},
};
}
});