chore: minify template files

This commit is contained in:
surunzi
2019-11-15 16:17:17 +08:00
parent 5792308d67
commit b465bf68de
3 changed files with 31 additions and 32 deletions

View File

@@ -74,10 +74,20 @@ module.exports = {
// https://github.com/wycats/handlebars.js/issues/1134
{
test: /\.hbs$/,
loader: nodeModDir + 'handlebars-loader/index.js',
options: {
runtime: srcDir + 'lib/handlebars.js'
}
use: [
{
loader: nodeModDir + 'handlebars-loader/index.js',
options: {
runtime: srcDir + 'lib/handlebars.js'
}
},
{
loader: 'html-minifier-loader',
options: {
ignoreCustomFragments: [/\{\{\{[^}]+\}\}\}/, /\{\{[^}]+\}\}/]
}
}
]
},
{
test: /\.json$/,