From e135e403e4ad9db7c7b366a168040cbd8f429a20 Mon Sep 17 00:00:00 2001 From: DoubleU23 <5007050+DoubleU23@users.noreply.github.com> Date: Wed, 4 May 2022 07:16:09 +0200 Subject: [PATCH] refactor: remove `addEnvVariables()` in merge fn TODO: refactor mode/env (#4) --- src/types/react/index.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/types/react/index.js b/src/types/react/index.js index 36f71ba..f326ba8 100644 --- a/src/types/react/index.js +++ b/src/types/react/index.js @@ -7,7 +7,7 @@ const mock = require('./mock.config') const { addEnvVariables } = require('../../utils') module.exports = (env) => { - addEnvVariables() + // TODO: refactor env/mode usage and config merging const configCommon = getCommonConfig(env) if (env === 'production') { @@ -17,7 +17,5 @@ module.exports = (env) => { const developConfig = getDevelopConfig(env) const configDev = merge(configCommon, developConfig) - return env === 'development_mock' - ? merge(configDev, mock.config, addEnvVariables()) - : merge(configDev, addEnvVariables()) + return merge(configDev, (env === 'development_mock' && mock.config)) }