Sha256: 10fe921c96dcd31d856672cdb0f51f632cd80f85856fa90059664f1c083d6a64

Contents?: true

Size: 585 Bytes

Versions: 35

Compression:

Stored size: 585 Bytes

Contents

const { isBoolean } = require('./utils/helpers')
const config = require('./config')

const fetch = (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 || 'WEBPACKER_DEV_SERVER'

  Object.keys(devServerConfig).forEach((key) => {
    const envValue = fetch(`${envPrefix}_${key.toUpperCase().replace(/_/g, '')}`)
    if (envValue !== undefined) devServerConfig[key] = envValue
  })
}

module.exports = devServerConfig || {}

Version data entries

35 entries across 35 versions & 9 rubygems

Version Path
optimacms-0.1.61 spec/dummy/node_modules/@rails/webpacker/package/dev_server.js
disco_app-0.18.0 test/dummy/node_modules/@rails/webpacker/package/dev_server.js
disco_app-0.18.2 test/dummy/node_modules/@rails/webpacker/package/dev_server.js
groonga-client-model-6.0.0 test/apps/rails6.0.3.5/node_modules/@rails/webpacker/package/dev_server.js
webpacker-4.3.0 package/dev_server.js
enju_library-0.3.8 spec/dummy/node_modules/@rails/webpacker/package/dev_server.js
webpacker-5.0.1 package/dev_server.js
webpacker-5.0.0 package/dev_server.js
jetpacker-0.4.2 package/dev_server.js
jetpacker-0.4.1 package/dev_server.js
jetpacker-0.4.0 package/dev_server.js
jetpacker-0.3.0 package/dev_server.js
jetpacker-0.2.0 package/dev_server.js
webpacker-4.2.2 package/dev_server.js
webpacker-4.2.1 package/dev_server.js
webpacker-4.2.0 package/dev_server.js
webpacker-4.1.0 package/dev_server.js
chatops-rpc-0.0.2 fixtures/chatops-controller-example/vendor/bundle/ruby/2.5.0/gems/webpacker-4.0.7/package/dev_server.js
chatops-rpc-0.0.1 fixtures/chatops-controller-example/vendor/bundle/ruby/2.5.0/gems/webpacker-4.0.7/package/dev_server.js
jester-data-8.0.0 node_modules/@rails/webpacker/package/dev_server.js