Sha256: b24b556841907dd87f4f30c8b0f17c8a51984c7fe17dd917227f9889a78dad23

Contents?: true

Size: 760 Bytes

Versions: 29

Compression:

Stored size: 760 Bytes

Contents

const { resolve } = require('path')
const { realpathSync } = require('fs')
const { source_path: sourcePath, additional_paths: additionalPaths } = 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|ts|tsx)?(\.erb)?$/,
  include: [sourcePath, ...additionalPaths].map((p) => {
    try {
      return realpathSync(p)
    } catch (e) {
      return resolve(p)
    }
  }),
  exclude: /node_modules/,
  use: [
    {
      loader: 'babel-loader',
      options: {
        cacheDirectory: true,
        cacheCompression: nodeEnv === 'production',
        compact: nodeEnv === 'production'
      }
    }
  ]
}

Version data entries

29 entries across 29 versions & 7 rubygems

Version Path
cm-admin-1.5.22 vendor/bundle/ruby/3.3.0/gems/webpacker-5.4.4/package/rules/babel.js
cm-admin-1.5.21 vendor/bundle/ruby/3.3.0/gems/webpacker-5.4.4/package/rules/babel.js
cm-admin-1.5.20 vendor/bundle/ruby/3.3.0/gems/webpacker-5.4.4/package/rules/babel.js
jetpacker-0.7.0 package/rules/babel.js
webpacker-5.4.4 package/rules/babel.js
jetpacker-0.6.0 package/rules/babel.js
disco_app-0.16.1 test/dummy/node_modules/@rails/webpacker/package/rules/babel.js
disco_app-0.15.2 test/dummy/node_modules/@rails/webpacker/package/rules/babel.js
disco_app-0.18.4 test/dummy/node_modules/@rails/webpacker/package/rules/babel.js
disco_app-0.18.1 test/dummy/node_modules/@rails/webpacker/package/rules/babel.js
disco_app-0.12.7.pre.puma.pre.3 test/dummy/node_modules/@rails/webpacker/package/rules/babel.js
disco_app-0.14.0 test/dummy/node_modules/@rails/webpacker/package/rules/babel.js
disco_app-0.13.6.pre.puma.pre.3 test/dummy/node_modules/@rails/webpacker/package/rules/babel.js
webpacker-5.4.3 package/rules/babel.js
webpacker-5.4.2 package/rules/babel.js
webpacker-5.4.1 package/rules/babel.js
webpacker-5.4.0 package/rules/babel.js
webpacker-5.3.0 package/rules/babel.js
webpacker-5.2.2 package/rules/babel.js
tang-0.2.1 spec/tang_app/node_modules/@rails/webpacker/package/rules/babel.js