Sha256: fec155035566f16b70b1bbe6e86c514f9f75f0229b053a781274b48991bf9775

Contents?: true

Size: 491 Bytes

Versions: 2

Compression:

Stored size: 491 Bytes

Contents

/* eslint global-require: 0 */
/* eslint import/no-dynamic-require: 0 */

const load = (name) => {
  try {
    return require(`./${name}`)
  } catch (e) {
    return null
  }
}

const rules = {
  file: load('file'),
  svg: load('svg'),
  css: load('css'),
  sass: load('sass'),
  babel: load('babel'),
  erb: load('erb'),
  coffee: load('coffee'),
  html: load('html'),
  less: load('less')
}

module.exports = Object.keys(rules)
  .filter((key) => !!rules[key])
  .map((key) => rules[key])

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
webpacker-6.0.0.pre.2 package/rules/index.js
webpacker-6.0.0.pre.1 package/rules/index.js