Reduce search-index.js size

This commit is contained in:
Guillaume Gomez
2018-12-16 02:35:39 +01:00
parent ceb2512144
commit f42407f114
3 changed files with 8 additions and 5 deletions

View File

@@ -1223,7 +1223,10 @@ fn write_minify_replacer<W: Write>(dst: &mut W,
-> io::Result<()> {
if enable_minification {
writeln!(dst, "{}",
minifier::js::minify_and_replace_keywords(contents, keywords_to_replace))
minifier::js::minify_and_replace_keywords(contents, keywords_to_replace)
.apply(minifier::js::clean_tokens)
.apply(minifier::js::aggregate_strings)
.to_string())
} else {
writeln!(dst, "{}", contents)
}