fix: use html-minifier-terser instead of html-minifier

html-minifier-terser was developed based on html-minifier, and the difference
between them is that html-minifier-terser can minify inline ES6 scripts in html
file, but html-minifier cannot.
This commit is contained in:
Jinzhe Zeng 2021-03-01 18:20:22 -05:00
parent ef57b75638
commit 8f7fdcc8f0
No known key found for this signature in database
GPG Key ID: 7C1BB88960642788
3 changed files with 3 additions and 3 deletions

View File

@ -1,6 +1,6 @@
'use strict'
const { minify: htmlMinify } = require('html-minifier')
const { minify: htmlMinify } = require('html-minifier-terser')
const CleanCSS = require('clean-css')
const { minify: terserMinify } = require('terser')
const Svgo = require('svgo')

View File

@ -24,7 +24,7 @@
"repository": "curbengh/hexo-yam",
"dependencies": {
"clean-css": "^4.2.1",
"html-minifier": "^4.0.0",
"html-minifier-terser": "^5.1.1",
"micromatch": "^4.0.2",
"minify-xml": "^2.1.1",
"svgo": "^1.2.2",

View File

@ -2,7 +2,7 @@
'use strict'
const Hexo = require('hexo')
const { minify: htmlMinify } = require('html-minifier')
const { minify: htmlMinify } = require('html-minifier-terser')
describe('html', () => {
const hexo = new Hexo(__dirname)