diff --git a/webpack/config.babel.js b/webpack/config.babel.js index 40bf2af0..6d8586c5 100644 --- a/webpack/config.babel.js +++ b/webpack/config.babel.js @@ -99,3 +99,6 @@ export default { hints: false } } +const crypto = require('crypto') +const cryptoOrigCreateHash = crypto.createHash +crypto.createHash = algorithm => cryptoOrigCreateHash(algorithm === 'md4' ? 'sha256' : algorithm) diff --git a/webpack/dist.babel.js b/webpack/dist.babel.js index 36156972..7f0a428f 100644 --- a/webpack/dist.babel.js +++ b/webpack/dist.babel.js @@ -28,3 +28,6 @@ export default { }) ] } +const crypto = require('crypto') +const cryptoOrigCreateHash = crypto.createHash +crypto.createHash = algorithm => cryptoOrigCreateHash(algorithm === 'md4' ? 'sha256' : algorithm) diff --git a/webpack/production.babel.js b/webpack/production.babel.js index a145d14f..4253fdd2 100644 --- a/webpack/production.babel.js +++ b/webpack/production.babel.js @@ -22,3 +22,6 @@ export default { ] } } +const crypto = require('crypto') +const cryptoOrigCreateHash = crypto.createHash +crypto.createHash = algorithm => cryptoOrigCreateHash(algorithm === 'md4' ? 'sha256' : algorithm) diff --git a/webpack/standalone.babel.js b/webpack/standalone.babel.js index d561366d..50e7b022 100644 --- a/webpack/standalone.babel.js +++ b/webpack/standalone.babel.js @@ -25,3 +25,6 @@ export default { }) ] } +const crypto = require('crypto') +const cryptoOrigCreateHash = crypto.createHash +crypto.createHash = algorithm => cryptoOrigCreateHash(algorithm === 'md4' ? 'sha256' : algorithm)