From 60fbf991faa4fedbc856eba1de9cf523932b222d Mon Sep 17 00:00:00 2001 From: Nemo | DFR Date: Thu, 5 Oct 2023 12:13:35 +0900 Subject: [PATCH] build(all) upgrade node from 16 -> 18 node 17 switched to openssl 3, which has some incompatibilities with older versions, see https://nodejs.org/en/blog/release/v17.0.0#openssl-3-0 webpack 4 relies on the older openssl version, only webpack 5 and newer uses openssl 3, see https://github.com/webpack/webpack/issues/14532#issuecomment-947513562 https://github.com/webpack/webpack/pull/14584 That's why we use the --openssl-legacy-provider node option when running webpack. --- .nvmrc | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.nvmrc b/.nvmrc index b6a7d89..3c03207 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -16 +18 diff --git a/package.json b/package.json index 3c5166f..c4bef66 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,7 @@ "author": "Moneytree", "license": "MIT", "scripts": { - "build": "rm -rf dist && webpack", + "build": "rm -rf dist && NODE_OPTIONS=--openssl-legacy-provider webpack", "prepareRelease": "npm run build && git add dist", "createChangelog": "conventional-changelog -p angular -i CHANGELOG.md -s -r 0 && git add CHANGELOG.md", "version": "npm run prepareRelease && npm run createChangelog",