Sha256: 5da518793b2e8fd40f542a91569aa2ca5db5616cd6e98b135cc4b6ca77e581a8

Contents?: true

Size: 423 Bytes

Versions: 1

Compression:

Stored size: 423 Bytes

Contents

const { env, webpackConfig } = require('shakapacker')
const { existsSync } = require('fs')
const { resolve } = require('path')

const envSpecificConfig = () => {
  const path = resolve(__dirname, `${env.nodeEnv}.js`)
  if (existsSync(path)) {
    console.log(`Loading ENV specific webpack configuration file ${path}`)
    return require(path)
  } else {
    return webpackConfig
  }
}

module.exports = envSpecificConfig()

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
react_on_rails-13.0.0.beta.0 lib/generators/react_on_rails/templates/base/base/config/webpack/webpack.config.js.tt