Skip to content

Commit 4762ca7

Browse files
authored
Merge pull request #758 from topcoder-platform/env-fixes
log build mode
2 parents 7f981b4 + 852fa4e commit 4762ca7

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

craco.config.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,13 @@ const BabelRcPlugin = require('@jackwilsdon/craco-use-babelrc');
55

66
const isProd = process.env.APPMODE === "production";
77

8+
function getModeName() {
9+
const index = process.argv.indexOf('--mode');
10+
return index === -1 ? '' : process.argv[index + 1] || ''
11+
}
12+
13+
console.log({buildMode: getModeName()});
14+
815
const localIdentName = isProd
916
? "[hash:base64:6]"
1017
: "[name]_[local]__[hash:base64:6]";

0 commit comments

Comments
 (0)