提交 cd0f4e54 编写于 作者: Q qiang

fix: build with node17+

上级 8078bef0
......@@ -13,6 +13,22 @@ const {
generateApiManifest
} = require('./manifest')
const crypto = require('crypto')
/**
* The MD4 algorithm is not available anymore in Node.js 17+ (because of library SSL 3).
* In that case, silently replace MD4 by the MD5 algorithm.
*/
try {
crypto.createHash('md4')
} catch (e) {
// console.warn('Crypto "MD4" is not supported anymore by this Node.js version');
const origCreateHash = crypto.createHash
crypto.createHash = (alg, opts) => {
return origCreateHash(alg === 'md4' ? 'md5' : alg, opts)
}
}
const fixInnerHTML = require('./fixInnerHTML')
const service = new Service(process.env.VUE_CLI_CONTEXT || process.cwd(), {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册