diff --git a/patches/rn-fetch-blob+0.12.0.patch b/patches/rn-fetch-blob+0.12.0.patch new file mode 100644 index 0000000000..01aec89d36 --- /dev/null +++ b/patches/rn-fetch-blob+0.12.0.patch @@ -0,0 +1,22 @@ +diff --git a/node_modules/rn-fetch-blob/index.js b/node_modules/rn-fetch-blob/index.js +index 8ab5e96..9bc8802 100644 +--- a/node_modules/rn-fetch-blob/index.js ++++ b/node_modules/rn-fetch-blob/index.js +@@ -21,7 +21,7 @@ import fs from './fs' + import getUUID from './utils/uuid' + import base64 from 'base-64' + import polyfill from './polyfill' +-import _ from 'lodash' ++import reduce from 'lodash.reduce' + import android from './android' + import ios from './ios' + import JSONStream from './json-stream' +@@ -224,7 +224,7 @@ function fetch(...args:any):Promise { + + // # 241 normalize null or undefined headers, in case nil or null string + // pass to native context +- headers = _.reduce(headers, (result, value, key) => { ++ headers = reduce(headers, (result, value, key) => { + result[key] = value || '' + return result + }, {}); diff --git a/patches/rn-fetch-blob+0.12.0.patch.md b/patches/rn-fetch-blob+0.12.0.patch.md new file mode 100644 index 0000000000..642a8f34d3 --- /dev/null +++ b/patches/rn-fetch-blob+0.12.0.patch.md @@ -0,0 +1,3 @@ +## rn-fetch-blob Patch + +This patch removes a dependency on `lodash`, changing it to `lodash.reduce` to reduce bundle size. \ No newline at end of file