Sha256: 704c8a1d37ede587635ec2e502fdae932b5315abe52853ef862e698ac375548b
Contents?: true
Size: 522 Bytes
Versions: 37
Compression:
Stored size: 522 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]' }, context: join(sourcePath) } } ] }
Version data entries
37 entries across 37 versions & 9 rubygems