Merge branch 'fix-node-18-crypto' into 'master'
Fix build failure due to crypto when using Node 18 or higher See merge request timvisee/send!33
This commit is contained in:
commit
5124572dba
1 changed files with 7 additions and 0 deletions
|
@ -6,6 +6,13 @@ const VersionPlugin = require('./build/version_plugin');
|
||||||
const AndroidIndexPlugin = require('./build/android_index_plugin');
|
const AndroidIndexPlugin = require('./build/android_index_plugin');
|
||||||
const ExtractTextPlugin = require('extract-text-webpack-plugin');
|
const ExtractTextPlugin = require('extract-text-webpack-plugin');
|
||||||
|
|
||||||
|
// Fix for node 18+
|
||||||
|
// See: <https://stackoverflow.com/a/78005686/1000145>
|
||||||
|
const crypto = require('crypto');
|
||||||
|
const crypto_orig_createHash = crypto.createHash;
|
||||||
|
crypto.createHash = algorithm =>
|
||||||
|
crypto_orig_createHash(algorithm == 'md4' ? 'sha256' : algorithm);
|
||||||
|
|
||||||
const webJsOptions = {
|
const webJsOptions = {
|
||||||
babelrc: false,
|
babelrc: false,
|
||||||
presets: [
|
presets: [
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue