Skip to content

Commit b840959

Browse files
author
Adrien Fabre
committed
Fix potential bug in minifying step (seems to fix prettier 3.2.5 upgrade)
1 parent 50af0fb commit b840959

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tools/eleventy/transforms.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const env = process.env.ELEVENTY_ENV;
55
// HTML minifier transform
66
// Also minifies JS and CSS
77
// TODO Check continueOnParseError option and how to handle failure in CI
8-
function htmlmin(content, outputPath) {
8+
async function htmlmin(content, outputPath) {
99
if (!outputPath.endsWith('.html')) {
1010
return content;
1111
}
@@ -14,7 +14,7 @@ function htmlmin(content, outputPath) {
1414
return content;
1515
}
1616

17-
const prettified = prettier.format(content, {parser: 'html'});
17+
const prettified = await prettier.format(content, {parser: 'html'});
1818

1919
const minified = htmlminifier.minify(prettified, {
2020
keepClosingSlash: true,

0 commit comments

Comments
 (0)