feat: use cross-fetch instead of node-fetch (#19621)

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
This commit is contained in:
Justin Starry
2021-09-07 17:09:13 -05:00
committed by GitHub
parent 529fefc7cc
commit 4c6f9bac32
4 changed files with 112 additions and 113 deletions

View File

@ -58,7 +58,7 @@ function generateConfig(configType, format) {
'crypto-hash',
'jayson/lib/client/browser',
'js-sha3',
'node-fetch',
'cross-fetch',
'rpc-websockets',
'secp256k1',
'superstruct',
@ -87,9 +87,10 @@ function generateConfig(configType, format) {
'bs58',
'buffer',
'crypto-hash',
'http',
'https',
'jayson/lib/client/browser',
'js-sha3',
// 'node-fetch', will resolve to whatwg-fetch
'rpc-websockets',
'secp256k1',
'superstruct',
@ -99,6 +100,8 @@ function generateConfig(configType, format) {
break;
}
case 'iife': {
config.external = ['http', 'https'];
config.output = [
{
file: 'lib/index.iife.js',