Closed mavdotjs closed 2 years ago
Hi! ๐
Firstly, thanks for your work on this project! ๐
Today I used patch-package to patch cross-fetch@3.1.4 for the project I'm working on.
cross-fetch@3.1.4
Here is the diff that solved my problem:
diff --git a/node_modules/cross-fetch/dist/browser-ponyfill.js b/node_modules/cross-fetch/dist/browser-ponyfill.js index f26eb09..7e3ef50 100644 --- a/node_modules/cross-fetch/dist/browser-ponyfill.js +++ b/node_modules/cross-fetch/dist/browser-ponyfill.js @@ -545,10 +545,11 @@ delete __self__.fetch.polyfill; // Choose between native implementation (global) or custom implementation (__self__) // var ctx = global.fetch ? global : __self__; var ctx = __self__; // this line disable service worker support temporarily -exports = ctx.fetch // To enable: import fetch from 'cross-fetch' -exports.default = ctx.fetch // For TypeScript consumers without esModuleInterop. -exports.fetch = ctx.fetch // To enable: import {fetch} from 'cross-fetch' -exports.Headers = ctx.Headers -exports.Request = ctx.Request -exports.Response = ctx.Response -module.exports = exports +// exports = ctx.fetch // To enable: import fetch from 'cross-fetch' +// exports.default = ctx.fetch // For TypeScript consumers without esModuleInterop. +// exports.fetch = ctx.fetch // To enable: import {fetch} from 'cross-fetch' +// exports.Headers = ctx.Headers +// exports.Request = ctx.Request +// exports.Response = ctx.Response +// module.exports = exports +export default ctx \ No newline at end of file
This issue body was partially generated by patch-package.
Hi! ๐
Firstly, thanks for your work on this project! ๐
Today I used patch-package to patch
cross-fetch@3.1.4
for the project I'm working on.Here is the diff that solved my problem:
This issue body was partially generated by patch-package.