axios-fetch
axios-fetch copied to clipboard
Not working in IE11
Not working in IE11 becuase In library you are using node-fetch module which does not work in ie11 so please include require('es6-promise').polyfill(); require('isomorphic-fetch');
top of your code.
Cause of issue: inside node-fetch
var getGlobal = function () {
// the only reliable means to get the global object is
// Function('return this')()
// However, this causes CSP violations in Chrome apps.
if (typeof self !== 'undefined') { console.log('self', self.fetch); return self; }
if (typeof window !== 'undefined') { console.log('window'); return window; }
if (typeof global !== 'undefined') { return global; }
throw new Error('unable to locate global object');
}
var global = getGlobal(); console.log('global', global); module.exports = exports = global.fetch;
exports.default = global.fetch.bind(global); this line throw exception becuase fetch is undefined in ie11
Would it be possible to document that polyfills are needed to support ie11 and avoid adding the polyfills for all consumers?
In my case it is not working. if i add these polyfill in your library then it works fine.
Please suggest me what should i do because we need urgent solution for this issue.
On Mon, Jan 27, 2020 at 6:15 PM Matt Lavin [email protected] wrote:
Would it be possible to document that polyfills are needed to support ie11 and avoid adding the polyfills for all consumers?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/lifeomic/axios-fetch/issues/38?email_source=notifications&email_token=AG6YAJ63NOK2OX6RUW2KVR3Q73JPBA5CNFSM4KMAACU2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEJ7LUII#issuecomment-578730529, or unsubscribe https://github.com/notifications/unsubscribe-auth/AG6YAJZLQJWZBMKT64JOIVTQ73JPBANCNFSM4KMAACUQ .
Yes, You are right. no need to inlcude these polyfill in library just document these for ie 11.
Would you be willing to contribute the updated documentation? I haven't tried to support IE 11 and you might have the steps you did to make it work from your efforts yesterday
Sure, I will update it.
On Tue, Jan 28, 2020, 8:09 PM Matt Lavin [email protected] wrote:
Would you be willing to contribute the updated documentation? I haven't tried to support IE 11 and you might have the steps you did to make it work from your efforts yesterday
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/lifeomic/axios-fetch/issues/38?email_source=notifications&email_token=AG6YAJ36NKOHKQEROVHKZZ3RAA7S5A5CNFSM4KMAACU2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEKDQ7LA#issuecomment-579276716, or unsubscribe https://github.com/notifications/unsubscribe-auth/AG6YAJ2GBMNKCD5FKN7M6H3RAA7S5ANCNFSM4KMAACUQ .