Skip to content

Commit

Permalink
Fix Node.js v12 build
Browse files Browse the repository at this point in the history
  • Loading branch information
seanpoulter committed Mar 8, 2024
1 parent 1e9ac91 commit c706fdd
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions package-scripts.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ const optional = cmd =>
const timeout = n => cmd => `timeout -t ${n}m -- ${cmd}`
const timeout5 = timeout(5)

// Allow Webpack 4 to use the restricted OpenSSL algorithm or key size in Node 17 and above.
// See https://github.com/nodejs/node/blob/main/doc/changelogs/CHANGELOG_V17.md#2021-10-19-version-1700-current-bethgriggs.
const NODE_MAJOR_VERSION = Number(process.versions.node.split('.')[0])
const NODE_OPTIONS = NODE_MAJOR_VERSION >= 17 ? `${process.env.NODE_OPTIONS} --openssl-legacy-provider` : process.env.NODE_OPTIONS;

module.exports = {
scripts: {
clean: {
Expand Down

0 comments on commit c706fdd

Please sign in to comment.