Skip to content

Commit

Permalink
fix(Webpack): remove ci check so config gets set
Browse files Browse the repository at this point in the history
  • Loading branch information
plondon committed May 9, 2018
1 parent fbc19de commit db74a9a
Showing 1 changed file with 13 additions and 15 deletions.
28 changes: 13 additions & 15 deletions packages/blockchain-wallet-v4-frontend/webpack.config.js
Expand Up @@ -20,21 +20,19 @@ let mockWalletOptions
let iSignThisDomain

// load, parse and log application configuration if not a CI build
if (!isCiBuild) {
mockWalletOptions = require('./../../config/wallet-options-v4.json')
iSignThisDomain = mockWalletOptions.platforms.web.coinify.config.iSignThisDomain
try {
envConfig = require(PATHS.envConfig + process.env.NODE_ENV + '.js')
} catch (e) {
console.log(chalk.red('\u{1F6A8} WARNING \u{1F6A8} ') + chalk.yellow(`Failed to load ${process.env.NODE_ENV}.js config file! Using the production config instead.\n`))
envConfig = require(PATHS.envConfig + 'production.js')
} finally {
console.log(chalk.blue('\u{1F6A7} CONFIGURATION \u{1F6A7}'))
console.log(chalk.cyan('Root URL') + `: ${envConfig.ROOT_URL}`)
console.log(chalk.cyan('API Domain') + `: ${envConfig.API_DOMAIN}`)
console.log(chalk.cyan('Wallet Helper Domain') + ': ' + chalk.blue(envConfig.WALLET_HELPER_DOMAIN))
console.log(chalk.cyan('Web Socket URL') + ': ' + chalk.blue(envConfig.WEB_SOCKET_URL))
}
mockWalletOptions = require('./../../config/wallet-options-v4.json')
iSignThisDomain = mockWalletOptions.platforms.web.coinify.config.iSignThisDomain
try {
envConfig = require(PATHS.envConfig + process.env.NODE_ENV + '.js')
} catch (e) {
console.log(chalk.red('\u{1F6A8} WARNING \u{1F6A8} ') + chalk.yellow(`Failed to load ${process.env.NODE_ENV}.js config file! Using the production config instead.\n`))
envConfig = require(PATHS.envConfig + 'production.js')
} finally {
console.log(chalk.blue('\u{1F6A7} CONFIGURATION \u{1F6A7}'))
console.log(chalk.cyan('Root URL') + `: ${envConfig.ROOT_URL}`)
console.log(chalk.cyan('API Domain') + `: ${envConfig.API_DOMAIN}`)
console.log(chalk.cyan('Wallet Helper Domain') + ': ' + chalk.blue(envConfig.WALLET_HELPER_DOMAIN))
console.log(chalk.cyan('Web Socket URL') + ': ' + chalk.blue(envConfig.WEB_SOCKET_URL))
}

module.exports = {
Expand Down

0 comments on commit db74a9a

Please sign in to comment.