Initial commit

This commit is contained in:
Alex Gleason
2020-03-27 15:59:38 -05:00
commit b1b5dc62db
664 changed files with 83511 additions and 0 deletions

20
webpack/rules/file.js Normal file
View File

@ -0,0 +1,20 @@
const { join } = require('path');
const { settings } = require('../configuration');
module.exports = {
test: new RegExp(`(${settings.static_assets_extensions.join('|')})$`, 'i'),
use: [
{
loader: 'file-loader',
options: {
name(file) {
if (file.includes(settings.source_path)) {
return 'media/[path][name]-[hash].[ext]';
}
return 'media/[folder]/[name]-[hash:8].[ext]';
},
context: join(settings.source_path),
},
},
],
};