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