diff --git a/polyfill/Blob.js b/polyfill/Blob.js index 53662a798..c99754dc2 100644 --- a/polyfill/Blob.js +++ b/polyfill/Blob.js @@ -2,12 +2,13 @@ // Use of this source code is governed by a MIT-style license that can be // found in the LICENSE file. -import RNFetchBlob from '../index.js' +import {NativeModules} from 'react-native'; import fs from '../fs.js' import getUUID from '../utils/uuid' import Log from '../utils/log.js' import EventTarget from './EventTarget' +const RNFetchBlob = NativeModules.RNFetchBlob const log = new Log('Blob') const blobCacheDir = fs.dirs.DocumentDir + '/RNFetchBlob-blobs/' diff --git a/polyfill/Fetch.js b/polyfill/Fetch.js index 3ecb5915c..8cc9f08e6 100644 --- a/polyfill/Fetch.js +++ b/polyfill/Fetch.js @@ -1,9 +1,10 @@ -import RNFetchBlob from '../index.js' +import {NativeModules} from 'react-native'; import Log from '../utils/log.js' import fs from '../fs' import unicode from '../utils/unicode' import Blob from './Blob' +const RNFetchBlob = NativeModules.RNFetchBlob const log = new Log('FetchPolyfill') log.disable() diff --git a/polyfill/XMLHttpRequest.js b/polyfill/XMLHttpRequest.js index 9036b2bc8..d52e47e19 100644 --- a/polyfill/XMLHttpRequest.js +++ b/polyfill/XMLHttpRequest.js @@ -2,13 +2,14 @@ // Use of this source code is governed by a MIT-style license that can be // found in the LICENSE file. -import RNFetchBlob from '../index.js' +import {NativeModules} from 'react-native'; import XMLHttpRequestEventTarget from './XMLHttpRequestEventTarget.js' import Log from '../utils/log.js' import Blob from './Blob.js' import ProgressEvent from './ProgressEvent.js' import URIUtil from '../utils/uri' +const RNFetchBlob = NativeModules.RNFetchBlob const log = new Log('XMLHttpRequest') log.disable()