Sha256: f49402081e5f097f9b60aa466995f30b0fdb0a7a61067f58ec0c1d90212dc920

Contents?: true

Size: 586 Bytes

Versions: 6

Compression:

Stored size: 586 Bytes

Contents

const path = require('path')
const { env } = require('../configuration.js')

const elmSource = path.resolve(process.cwd())
const elmMake = `${elmSource}/node_modules/.bin/elm-make`
const elmDefaultOptions = `cwd=${elmSource}&pathToMake=${elmMake}`

const loaderOptions = () => {
  if (env.NODE_ENV === 'production') {
    return `elm-webpack-loader?${elmDefaultOptions}`
  }

  return `elm-hot-loader!elm-webpack-loader?${elmDefaultOptions}&verbose=true&warn=true&debug=true`
}

module.exports = {
  test: /\.elm$/,
  exclude: [/elm-stuff/, /node_modules/],
  loader: loaderOptions()
}

Version data entries

6 entries across 6 versions & 3 rubygems

Version Path
webpacker-react-on-rails-3.0.0.rc.1 lib/install/config/loaders/installers/elm.js
webpacker-react-on-rails-2.0 lib/install/config/loaders/installers/elm.js
webpacker-legacy-0.1.2 lib/install/config/loaders/installers/elm.js
webpacker-legacy-0.1.1 lib/install/config/loaders/installers/elm.js
webpacker-legacy-0.1.0 lib/install/config/loaders/installers/elm.js
webpacker-2.0 lib/install/config/loaders/installers/elm.js