Sha256: 22814c699a265711a136f84daedbdced62af25ad1a53a56c7e03341876c0ee46

Contents?: true

Size: 654 Bytes

Versions: 8

Compression:

Stored size: 654 Bytes

Contents

const { resolve } = require('path')
const { realpathSync } = require('fs')

const {
  source_path: sourcePath,
  additional_paths: additionalPaths
} = require('../config')
const { isProduction } = require('../env')

module.exports = {
  test: /\.(js|jsx|mjs|ts|tsx)?(\.erb)?$/,
  include: [sourcePath, ...additionalPaths].map((p) => {
    try {
      return realpathSync(p)
    } catch (e) {
      return resolve(p)
    }
  }),
  exclude: /node_modules/,
  use: [
    {
      loader: require.resolve('babel-loader'),
      options: {
        cacheDirectory: true,
        cacheCompression: isProduction,
        compact: isProduction
      }
    }
  ]
}

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
webpacker-6.0.0.beta.5 package/rules/babel.js
webpacker-6.0.0.beta.4 package/rules/babel.js
webpacker-6.0.0.beta.3 package/rules/babel.js
webpacker-6.0.0.beta.2 package/rules/babel.js
webpacker-6.0.0.beta.1 package/rules/babel.js
webpacker-6.0.0.beta package/rules/babel.js
webpacker-6.0.0.pre.2 package/rules/babel.js
webpacker-6.0.0.pre.1 package/rules/babel.js