Skip to content

Commit 9bfc03e

Browse files
committed
refactor(build): Use babel-runtime instead of es6-promise polyfill
Fixes #358
1 parent 96daeba commit 9bfc03e

3 files changed

Lines changed: 5 additions & 15 deletions

File tree

gulpfile.babel.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ const externalConfig = {
4848
external: [
4949
'axios',
5050
'js-base64',
51-
'es6-promise',
51+
'babel-runtime',
5252
'debug',
5353
'utf8'
5454
],

lib/Requestable.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,9 @@
88
import axios from 'axios';
99
import debug from 'debug';
1010
import {Base64} from 'js-base64';
11-
import {polyfill} from 'es6-promise';
1211

1312
const log = debug('github:request');
1413

15-
if (typeof Promise === 'undefined') {
16-
polyfill();
17-
}
18-
1914
/**
2015
* The error structure returned when a network call fails
2116
*/

package.json

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,8 @@
2626
],
2727
"plugins": [
2828
"add-module-exports",
29-
[
30-
"transform-es2015-modules-umd",
31-
{
32-
"globals": {
33-
"es6-promise": "Promise"
34-
}
35-
}
36-
]
29+
"transform-runtime",
30+
"transform-es2015-modules-umd"
3731
],
3832
"env": {
3933
"development": {
@@ -47,15 +41,16 @@
4741
],
4842
"dependencies": {
4943
"axios": "^0.10.0",
44+
"babel-runtime": "^6.9.2",
5045
"debug": "^2.2.0",
51-
"es6-promise": "^3.0.2",
5246
"js-base64": "^2.1.9",
5347
"utf8": "^2.1.1"
5448
},
5549
"devDependencies": {
5650
"babel-core": "^6.7.7",
5751
"babel-plugin-add-module-exports": "^0.2.1",
5852
"babel-plugin-transform-es2015-modules-umd": "^6.5.0",
53+
"babel-plugin-transform-runtime": "^6.9.0",
5954
"babel-preset-es2015": "^6.5.0",
6055
"babel-register": "^6.7.2",
6156
"babelify": "^7.3.0",

0 commit comments

Comments
 (0)