提交 97fa4a3a 编写于 作者: fxy060608's avatar fxy060608

fix(vue2): 兼容 node 17+

上级 456d35f6
const path = require('path')
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 {
manifestPlatformOptions
} = require('./lib/env')
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册