From ed61483066f4f6b83d1d35970bcffd27ebc6b2cb Mon Sep 17 00:00:00 2001 From: hzz780 Date: Wed, 3 Jul 2024 18:32:14 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=F0=9F=90=9B=20node-fetch:=20request=20i?= =?UTF-8?q?s=20not=20a=20function?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build/webpack.node.js | 8 ++++++++ package.json | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/build/webpack.node.js b/build/webpack.node.js index fd1d391b..76bd5cb5 100644 --- a/build/webpack.node.js +++ b/build/webpack.node.js @@ -22,6 +22,14 @@ const nodeConfig = { // 'scryptsy$': '../scrypt-polyfill.js', } }, + externals: { + 'node-fetch': { + commonjs2: 'node-fetch', + commonjs: 'node-fetch', + umd: 'node-fetch', + root: 'node-fetch' + } + }, target: 'node', optimization: { removeEmptyChunks: true, diff --git a/package.json b/package.json index 799ca5ca..9fd12a8c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "aelf-sdk", - "version": "3.4.14", + "version": "3.4.14-beta.1", "description": "aelf-sdk js library", "main": "dist/aelf.cjs.js", "browser": "dist/aelf.umd.js",