mirror of https://github.com/curbengh/hexo-yam
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:
parent
ef57b75638
commit
8f7fdcc8f0
|
@ -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')
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue