enhancement: add profiling flag to analyze run

Signed-off-by: Erik Michelson <github@erik.michelson.eu>
This commit is contained in:
Erik Michelson 2023-06-27 10:43:35 +02:00
parent 1e964839b4
commit 58c2cfe727
3 changed files with 15 additions and 4 deletions

View file

@ -43,9 +43,16 @@ const isDevMode = process.env.NODE_ENV === 'development'
*/
const isProductionMode = process.env.NODE_ENV === 'production'
/**
* Defines if the current runtime contains the bundle analyzer and profiling metrics.
* @type boolean
*/
const isProfilingMode = !!process.env.ANALYZE && isPositiveAnswer(process.env.ANALYZE)
module.exports = {
isTestMode,
isMockMode,
isDevMode,
isProductionMode
isProductionMode,
isProfilingMode
}