Sha256: 569f874bd6124ab0957b53c5f6432c86f2870db1360542b411237a3490ce4412

Contents?: true

Size: 547 Bytes

Versions: 10

Compression:

Stored size: 547 Bytes

Contents

const { join } = require('path')
const { source_path: sourcePath, static_assets_extensions: fileExtensions } = require('../config')

module.exports = {
  test: new RegExp(`(${fileExtensions.join('|')})$`, 'i'),
  use: [
    {
      loader: 'file-loader',
      options: {
        name(file) {
          if (file.includes(sourcePath)) {
            return 'media/[path][name]-[hash].[ext]'
          }
          return 'media/[folder]/[name]-[hash:8].[ext]'
        },
        esModule: false,
        context: join(sourcePath)
      }
    }
  ]
}

Version data entries

10 entries across 10 versions & 5 rubygems

Version Path
tang-0.2.1 spec/tang_app/node_modules/@rails/webpacker/package/rules/file.js
groonga-client-model-6.0.0 test/apps/rails6.1.3/node_modules/@rails/webpacker/package/rules/file.js
ruby2js-4.0.4 lib/tasks/testrails/node_modules/@rails/webpacker/package/rules/file.js
ruby2js-4.0.3 lib/tasks/testrails/node_modules/@rails/webpacker/package/rules/file.js
jetpacker-0.5.0 package/rules/file.js
tang-0.2.0 spec/tang_app/node_modules/@rails/webpacker/package/rules/file.js
tang-0.1.0 spec/tang_app/node_modules/@rails/webpacker/package/rules/file.js
tang-0.0.9 spec/tang_app/node_modules/@rails/webpacker/package/rules/file.js
webpacker-5.2.1 package/rules/file.js
webpacker-5.2.0 package/rules/file.js