Getting Error Promise is undefined in IE11

var ES6Promise = require("es6-promise");
ES6Promise.polyfill();
var axios = require("axios");

writing this above axios worked for me maybe other options also worked

it was mainly a cache issue in IE that i was facing

installing es6-promise-promise webpack plugin also worked

npm install es6-promise-promise

and include

new webpack.ProvidePlugin({
    Promise: 'es6-promise-promise', // works as expected
});

in webpack plugins

i will edit this answer with more possible options


You need to include Polyfill to make it work in Internet Explorer.

import { polyfill } from 'es6-promise'; polyfill();

Include polypill for browsers/devices that need it.

https://www.npmjs.com/package/polyfill-io-feature-detection


Add this script:

<script src="https://cdn.polyfill.io/v2/polyfill.min.js"></script>

After that you can test in the console if the Promise is working in IE

var promise = new Promise(function (resolve, reject) {
setTimeout(function () {
    resolve('bar');
}, 1000);
});
promise.then(function(result) {
  console.log(result);
});

You need to add Promise polyfill.

Include polyfill in your bundle. https://github.com/stefanpenner/es6-promise

Load polyfill only if the browser / device need: https://www.npmjs.com/package/polyfill-io-feature-detection