Sha256: c5797d4d06366d544f499c2bf50431235e524ce298e55e3aa554ca8e96968c19

Contents?: true

Size: 567 Bytes

Versions: 71

Compression:

Stored size: 567 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()}`)
    if (envValue !== undefined) devServerConfig[key] = envValue
  })
}

module.exports = devServerConfig || {}

Version data entries

71 entries across 71 versions & 8 rubygems

Version Path
shakapacker-6.1.1 package/dev_server.js
shakapacker-6.1.0 package/dev_server.js
shakapacker-6.1.0.beta.0 package/dev_server.js
shakapacker-6.0.2 package/dev_server.js
shakapacker-6.0.1 package/dev_server.js
shakapacker-6.0.0 package/dev_server.js
shakapacker-6.0.0.rc.14 package/dev_server.js
shakapacker-6.0.0.rc.13 package/dev_server.js
shakapacker-6.0.0.rc.12 package/dev_server.js
shakapacker-6.0.0.rc.6 package/dev_server.js
disco_app-0.16.1 test/dummy/node_modules/@rails/webpacker/package/dev_server.js
disco_app-0.15.2 test/dummy/node_modules/@rails/webpacker/package/dev_server.js
webpacker-6.0.0.rc.6 package/dev_server.js
disco_app-0.18.4 test/dummy/node_modules/@rails/webpacker/package/dev_server.js
disco_app-0.18.1 test/dummy/node_modules/@rails/webpacker/package/dev_server.js
disco_app-0.12.7.pre.puma.pre.3 test/dummy/node_modules/@rails/webpacker/package/dev_server.js
disco_app-0.14.0 test/dummy/node_modules/@rails/webpacker/package/dev_server.js
disco_app-0.13.6.pre.puma.pre.3 test/dummy/node_modules/@rails/webpacker/package/dev_server.js
webpacker-5.4.3 package/dev_server.js
webpacker-6.0.0.rc.5 package/dev_server.js