Merge pull request #76 from mearashadowfax/update-minifier
Replace 'html-minifier' with 'html-minifier-terser'
This commit is contained in:
commit
6db59a500f
3 changed files with 4 additions and 4 deletions
2
package-lock.json
generated
2
package-lock.json
generated
|
@ -9342,4 +9342,4 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -20,7 +20,7 @@
|
|||
"astro-compressor": "^0.4.1",
|
||||
"globby": "^14.0.1",
|
||||
"gsap": "^3.12.5",
|
||||
"html-minifier": "^4.0.0",
|
||||
"html-minifier-terser": "^7.2.0",
|
||||
"preline": "^2.1.0",
|
||||
"sharp": "^0.33.3",
|
||||
"sharp-ico": "^0.1.5",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import fs from 'node:fs/promises'
|
||||
import { globby } from 'globby'
|
||||
import { minify } from 'html-minifier'
|
||||
import { minify } from 'html-minifier-terser'
|
||||
|
||||
// Get all HTML files from the output directory
|
||||
const path = './.vercel/output/static'
|
||||
|
@ -12,7 +12,7 @@ await Promise.all(
|
|||
let html = await fs.readFile(file, 'utf-8')
|
||||
|
||||
// Minify the HTML
|
||||
html = minify(html, {
|
||||
html = await minify(html, {
|
||||
removeComments: true,
|
||||
preserveLineBreaks: true,
|
||||
collapseWhitespace: true,
|
||||
|
|
Loading…
Add table
Reference in a new issue