diff --git a/lib/axios.js b/lib/axios.js index 6a6a551..57b770e 100644 --- a/lib/axios.js +++ b/lib/axios.js @@ -5,16 +5,6 @@ var utils = require('./utils'); var dispatchRequest = require('./core/dispatchRequest'); var InterceptorManager = require('./core/InterceptorManager'); -// Polyfill ES6 Promise if needed -(function () { - // webpack is being used to set es6-promise to the native Promise - // for the standalone build. It's necessary to make sure polyfill exists. - var P = require('es6-promise'); - if (P && typeof P.polyfill === 'function') { - P.polyfill(); - } -})(); - var axios = module.exports = function axios(config) { config = utils.merge({ method: 'get', diff --git a/package.json b/package.json index ad9131a..79e143b 100644 --- a/package.json +++ b/package.json @@ -26,11 +26,9 @@ "url": "https://github.com/mzabriskie/axios/issues" }, "homepage": "https://github.com/mzabriskie/axios", - "dependencies": { - "es6-promise": "^2.3.0" - }, "devDependencies": { "coveralls": "^2.11.2", + "es6-promise": "^2.3.0", "grunt": "^0.4.5", "grunt-banner": "^0.4.0", "grunt-contrib-clean": "^0.6.0", diff --git a/test/specs/promise.spec.js b/test/specs/promise.spec.js index 36b9c64..5dd5088 100644 --- a/test/specs/promise.spec.js +++ b/test/specs/promise.spec.js @@ -1,3 +1,4 @@ +require('es6-promise').polyfill(); var axios = require('../../index'); describe('promise', function () {