diff --git a/lib/filter.js b/lib/filter.js index c41f46b..4b1c3c7 100644 --- a/lib/filter.js +++ b/lib/filter.js @@ -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') diff --git a/package.json b/package.json index 2738b4a..5cf3cb7 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/test/html.test.js b/test/html.test.js index 3b48989..0534a77 100644 --- a/test/html.test.js +++ b/test/html.test.js @@ -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)