Sha256: f127396ff98ab935a1cd7d616d467f794fd8e3d06a351f2d8aa032b471b6064a

Contents?: true

Size: 695 Bytes

Versions: 15

Compression:

Stored size: 695 Bytes

Contents

const { join, resolve } = require('path')
const { cache_path: cachePath, source_path: sourcePath, resolved_paths: resolvedPaths } = require('../config')
const { nodeEnv } = require('../env')

// Process application Javascript code with Babel.
// Uses application .babelrc to apply any transformations
module.exports = {
  test: /\.(js|jsx|mjs)?(\.erb)?$/,
  include: [sourcePath, ...resolvedPaths].map((p) => resolve(p)),
  exclude: /node_modules/,
  use: [
    {
      loader: 'babel-loader',
      options: {
        cacheDirectory: join(cachePath, 'babel-loader-node-modules'),
        cacheCompression: nodeEnv === 'production',
        compact: nodeEnv === 'production'
      }
    }
  ]
}

Version data entries

15 entries across 15 versions & 5 rubygems

Version Path
optimacms-0.1.61 spec/dummy/node_modules/@rails/webpacker/package/rules/babel.js
groonga-client-model-6.0.0 test/apps/rails6.0.3.5/node_modules/@rails/webpacker/package/rules/babel.js
webpacker-4.3.0 package/rules/babel.js
enju_library-0.3.8 spec/dummy/node_modules/@rails/webpacker/package/rules/babel.js
webpacker-5.0.1 package/rules/babel.js
webpacker-5.0.0 package/rules/babel.js
jetpacker-0.4.2 package/rules/babel.js
jetpacker-0.4.1 package/rules/babel.js
jetpacker-0.4.0 package/rules/babel.js
jetpacker-0.3.0 package/rules/babel.js
jetpacker-0.2.0 package/rules/babel.js
webpacker-4.2.2 package/rules/babel.js
webpacker-4.2.1 package/rules/babel.js
webpacker-4.2.0 package/rules/babel.js
webpacker-4.1.0 package/rules/babel.js