Sha256: 8020b763341df08727ca7a5c49c43b90800fe8783f516eb959c3b0a6da66af6d

Contents?: true

Size: 685 Bytes

Versions: 16

Compression:

Stored size: 685 Bytes

Contents

const { resolve } = require('path')

const isProduction = process.env.NODE_ENV === 'production'
const elmSource = resolve(process.cwd())
const elmMake = `${elmSource}/node_modules/.bin/elm-make`

const elmDefaultOptions = { cwd: elmSource, pathToMake: elmMake }
const developmentOptions = Object.assign({}, elmDefaultOptions, {
  verbose: true,
  warn: true,
  debug: true
})

const elmWebpackLoader = {
  loader: 'elm-webpack-loader',
  options: isProduction ? elmDefaultOptions : developmentOptions
}

module.exports = {
  test: /\.elm(\.erb)?$/,
  exclude: [/elm-stuff/, /node_modules/],
  use: isProduction ? [elmWebpackLoader] : [{ loader: 'elm-hot-loader' }, elmWebpackLoader]
}

Version data entries

16 entries across 16 versions & 2 rubygems

Version Path
webpacker-jets-3.2.101 lib/install/loaders/elm.js
webpacker-jets-3.2.100 lib/install/loaders/elm.js
webpacker-3.5.5 lib/install/loaders/elm.js
webpacker-3.5.3 lib/install/loaders/elm.js
webpacker-3.5.2 lib/install/loaders/elm.js
webpacker-3.5.1 lib/install/loaders/elm.js
webpacker-3.5.0 lib/install/loaders/elm.js
webpacker-3.4.3 lib/install/loaders/elm.js
webpacker-4.0.0.pre.pre.2 lib/install/loaders/elm.js
webpacker-4.0.0.pre.pre.1 lib/install/loaders/elm.js
webpacker-3.4.1 lib/install/loaders/elm.js
webpacker-3.4.0 lib/install/loaders/elm.js
webpacker-3.3.1 lib/install/loaders/elm.js
webpacker-3.3.0 lib/install/loaders/elm.js
webpacker-3.2.2 lib/install/loaders/elm.js
webpacker-3.2.1 lib/install/loaders/elm.js