This repository has been archived by the owner on Jul 12, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 12
/
config.js
55 lines (53 loc) · 1.5 KB
/
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
process.env.NODE_ENV = "development";
let env;
switch (process.env.NODE_ENV) {
case "development":
env = {
"process.env.DEVOPS_HOST": JSON.stringify(
process.env.DEVOPS_HOST || "devops-service.staging.saas.hand-china.com"
)
};
break;
case "production":
env = {
"process.env.DEVOPS_HOST": JSON.stringify(
process.env.DEVOPS_HOST || "devops-service.staging.saas.hand-china.com"
)
};
break;
default:
break;
}
const config = {
port: 9090,
output: "./dist",
htmlTemplate: "index.template.html",
devServerConfig: {},
webpackConfig(configs) {
const webpack = require("./devops/node_modules/webpack");
configs.plugins.push(new webpack.DefinePlugin(env));
// const BundleAnalyzerPlugin = require('./devops/node_modules/webpack-bundle-analyzer').BundleAnalyzerPlugin;
// configs.plugins.push(new BundleAnalyzerPlugin());
return configs;
},
entryName: "index",
root: "/",
routes: null, // by default, routes use main in package.json
// server: "http://api.staging.saas.hand-china.com", // api server
server: "http://api.alpha.saas.hand-china.com",
clientid: "localhost",
fileServer: "http://minio.staging.saas.hand-china.com",
titlename: "Choerodon",
favicon: "favicon.ico",
theme: {
"primary-color": "#3F51B5",
"icon-font-size-base": "16px"
},
dashboard: {
devops: {
components: "src/app/devops/dashboard/*",
locale: "src/app/devops/locale/dashboard/*"
}
}
};
module.exports = config;