Skip to content

Commit

Permalink
refactor: remove addEnvVariables() in merge fn
Browse files Browse the repository at this point in the history
TODO: refactor mode/env (#4)
  • Loading branch information
DoubleU23 committed May 4, 2022
1 parent bf0e0d8 commit e135e40
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/types/react/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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') {
Expand All @@ -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))
}

0 comments on commit e135e40

Please sign in to comment.