forked from wavetermdev/waveterm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.js
30 lines (29 loc) · 1019 Bytes
/
webpack.config.js
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
const { webDev, webProd } = require("./webpack/webpack.web.js");
const { electronDev, electronProd } = require("./webpack/webpack.electron.js");
module.exports = (env) => {
if (env.prod) {
console.log("using PROD (web+electron) webpack environment");
return [webProd, electronProd];
}
if (env["prod:web"]) {
console.log("using PROD (web) webpack environment");
return webProd;
}
if (env["prod:electron"]) {
console.log("using PROD (electron) webpack environment");
return electronProd;
}
if (env.dev) {
console.log("using DEV (web+electron) webpack environment");
return [webDev, electronDev];
}
if (env["dev:web"]) {
console.log("using DEV (web) webpack environment");
return webDev;
}
if (env["dev:electron"]) {
console.log("using DEV (electron) webpack environment");
return electronDev;
}
console.log("must specify a webpack environment using --env [dev|prod]");
};