Sha256: 500a5432d6ebeaf486fc9a9ff8331024d3cc62f71adc02d58914c740cbcbcd53

Contents?: true

Size: 461 Bytes

Versions: 21

Compression:

Stored size: 461 Bytes

Contents

const { env } = 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 {
    throw new Error(`Could not find file to load ${path}, based on NODE_ENV`)
  }
}

module.exports = envSpecificConfig()

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
react_on_rails-14.1.1 lib/generators/react_on_rails/templates/base/base/config/webpack/webpack.config.js.tt
react_on_rails-14.1.0 lib/generators/react_on_rails/templates/base/base/config/webpack/webpack.config.js.tt
react_on_rails-14.1.0.rc.0 lib/generators/react_on_rails/templates/base/base/config/webpack/webpack.config.js.tt
react_on_rails-15.0.0.alpha.1 lib/generators/react_on_rails/templates/base/base/config/webpack/webpack.config.js.tt
react_on_rails-14.0.5 lib/generators/react_on_rails/templates/base/base/config/webpack/webpack.config.js.tt
react_on_rails-14.0.4 lib/generators/react_on_rails/templates/base/base/config/webpack/webpack.config.js.tt
react_on_rails-14.0.3 lib/generators/react_on_rails/templates/base/base/config/webpack/webpack.config.js.tt
react_on_rails-14.0.2 lib/generators/react_on_rails/templates/base/base/config/webpack/webpack.config.js.tt
react_on_rails-14.0.0 lib/generators/react_on_rails/templates/base/base/config/webpack/webpack.config.js.tt
react_on_rails-13.4.0 lib/generators/react_on_rails/templates/base/base/config/webpack/webpack.config.js.tt
react_on_rails-13.3.5 lib/generators/react_on_rails/templates/base/base/config/webpack/webpack.config.js.tt
react_on_rails-13.3.4 lib/generators/react_on_rails/templates/base/base/config/webpack/webpack.config.js.tt
react_on_rails-13.3.3 lib/generators/react_on_rails/templates/base/base/config/webpack/webpack.config.js.tt
react_on_rails-13.3.2 lib/generators/react_on_rails/templates/base/base/config/webpack/webpack.config.js.tt
react_on_rails-13.3.1 lib/generators/react_on_rails/templates/base/base/config/webpack/webpack.config.js.tt
react_on_rails-13.3.0 lib/generators/react_on_rails/templates/base/base/config/webpack/webpack.config.js.tt
react_on_rails-13.2.0 lib/generators/react_on_rails/templates/base/base/config/webpack/webpack.config.js.tt
react_on_rails-13.1.0 lib/generators/react_on_rails/templates/base/base/config/webpack/webpack.config.js.tt
react_on_rails-13.0.2 lib/generators/react_on_rails/templates/base/base/config/webpack/webpack.config.js.tt
react_on_rails-13.0.1 lib/generators/react_on_rails/templates/base/base/config/webpack/webpack.config.js.tt