Sha256: 3d277316312a8c9f4fe2bf9ab7a66a9e01747801cecf2ce594567f4555ef59a5

Contents?: true

Size: 693 Bytes

Versions: 14

Compression:

Stored size: 693 Bytes

Contents

// These are the raw webpacker dev server config settings from the YML file with ENV overrides applied.
const { isBoolean } = require('./utils/helpers')
const config = require('./config')

const envFetch = (key) => {
  const value = process.env[key]
  return isBoolean(value) ? JSON.parse(value) : value
}

const devServerConfig = config.dev_server

if (devServerConfig) {
  const envPrefix = config.dev_server.env_prefix || 'SHAKAPACKER_DEV_SERVER'

  Object.keys(devServerConfig).forEach((key) => {
    const envValue = envFetch(`${envPrefix}_${key.toUpperCase()}`)
    if (envValue !== undefined) {
      devServerConfig[key] = envValue
    }
  })
}

module.exports = devServerConfig || {}

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
shakapacker-7.2.3 package/dev_server.js
shakapacker-7.3.0.beta.1 package/dev_server.js
shakapacker-7.2.2 package/dev_server.js
shakapacker-7.2.1 package/dev_server.js
shakapacker-7.2.0 package/dev_server.js
shakapacker-7.2.0.rc.0 package/dev_server.js
shakapacker-7.1.0 package/dev_server.js
shakapacker-7.0.3 package/dev_server.js
shakapacker-7.0.2 package/dev_server.js
shakapacker-7.0.1 package/dev_server.js
shakapacker-7.0.0 package/dev_server.js
shakapacker-7.0.0.rc.2 package/dev_server.js
shakapacker-7.0.0.rc.1 package/dev_server.js
shakapacker-7.0.0.rc.0 package/dev_server.js