Sha256: 1bd0b22d936fde03aaa0b9686604e1205fea416dbfe6de95b311ed350e1c9205

Contents?: true

Size: 573 Bytes

Versions: 13

Compression:

Stored size: 573 Bytes

Contents

const { dirname } = require('path')
const { source_path: sourcePath } = require('../config')

module.exports = {
  test: /\.(bmp|gif|jpe?g|png|tiff|ico|avif|webp|eot|otf|ttf|woff|woff2|svg)$/,
  exclude: /\.(js|mjs|jsx|ts|tsx)$/,
  type: 'asset/resource',
  generator: {
    filename: (pathData) => {
      const folders = dirname(pathData.filename)
        .replace(`${sourcePath}`, '')
        .split('/')
        .filter(Boolean)

      const foldersWithStatic = ['static', ...folders].join('/')
      return `${foldersWithStatic}/[name]-[hash][ext][query]`
    }
  }
}

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
shakapacker-7.2.3 package/rules/file.js
shakapacker-7.2.2 package/rules/file.js
shakapacker-7.2.1 package/rules/file.js
shakapacker-7.2.0 package/rules/file.js
shakapacker-7.2.0.rc.0 package/rules/file.js
shakapacker-7.1.0 package/rules/file.js
shakapacker-7.0.3 package/rules/file.js
shakapacker-7.0.2 package/rules/file.js
shakapacker-7.0.1 package/rules/file.js
shakapacker-7.0.0 package/rules/file.js
shakapacker-7.0.0.rc.2 package/rules/file.js
shakapacker-7.0.0.rc.1 package/rules/file.js
shakapacker-7.0.0.rc.0 package/rules/file.js