2021-04-24 19:44:01 +05:00
|
|
|
const { execSync } = require("child_process");
|
2021-10-22 00:00:19 +05:00
|
|
|
const { cpus } = require("os");
|
2021-12-16 12:03:42 +05:00
|
|
|
const { version } = require("./package.json");
|
2021-04-24 19:44:01 +05:00
|
|
|
|
2021-10-22 00:00:19 +05:00
|
|
|
const NUM_CPUS = cpus().length;
|
|
|
|
|
const IS_CI = process.env.CI;
|
2021-04-24 19:44:01 +05:00
|
|
|
const gitHash = execSync("git rev-parse --short HEAD").toString().trim();
|
2021-12-16 12:03:42 +05:00
|
|
|
const APP_VERSION = version.replaceAll(".", "");
|
|
|
|
|
console.log("App version:", APP_VERSION);
|
2021-04-24 19:44:01 +05:00
|
|
|
module.exports = {
|
2021-12-16 11:39:54 +05:00
|
|
|
test: {
|
|
|
|
|
TEST_ALL: true,
|
|
|
|
|
},
|
2021-04-24 19:44:01 +05:00
|
|
|
all: {
|
2021-10-22 00:00:19 +05:00
|
|
|
UV_THREADPOOL_SIZE: IS_CI ? NUM_CPUS : 2,
|
2021-10-23 11:00:15 +05:00
|
|
|
GENERATE_SOURCEMAP: false,
|
|
|
|
|
INLINE_RUNTIME_CHUNK: false,
|
2021-10-22 00:00:19 +05:00
|
|
|
DISABLE_ESLINT_PLUGIN: true,
|
2021-04-24 19:44:01 +05:00
|
|
|
REACT_APP_GIT_HASH: gitHash,
|
2021-12-16 12:03:42 +05:00
|
|
|
REACT_APP_VERSION: APP_VERSION,
|
2021-04-24 19:44:01 +05:00
|
|
|
},
|
|
|
|
|
dev: {
|
2021-06-10 00:53:24 +05:00
|
|
|
REACT_APP_CI: "true",
|
2021-04-24 19:44:01 +05:00
|
|
|
},
|
|
|
|
|
web: {
|
|
|
|
|
REACT_APP_PLATFORM: "web",
|
|
|
|
|
},
|
2021-05-31 09:53:31 +05:00
|
|
|
debug: {
|
2021-06-09 12:36:07 +05:00
|
|
|
PWDEBUG: 1,
|
2021-06-09 11:41:54 +05:00
|
|
|
DEBUG: "pw:api",
|
2021-05-31 09:53:31 +05:00
|
|
|
},
|
2021-05-31 09:30:24 +05:00
|
|
|
silent: {
|
2021-07-07 14:09:51 +05:00
|
|
|
REACT_APP_TEST: true,
|
2021-06-10 00:53:24 +05:00
|
|
|
DISABLE_ESLINT_PLUGIN: "true",
|
|
|
|
|
FAST_REFRESH: "false",
|
2021-05-31 09:30:24 +05:00
|
|
|
BROWSER: "none",
|
|
|
|
|
},
|
2021-04-24 19:44:01 +05:00
|
|
|
desktop: {
|
2021-04-29 09:31:21 +05:00
|
|
|
BROWSER: "none",
|
2021-04-24 19:44:01 +05:00
|
|
|
REACT_APP_PLATFORM: "desktop",
|
|
|
|
|
},
|
|
|
|
|
};
|