From 16eee6c4d7137ffa2a7fe169f449391886daaa29 Mon Sep 17 00:00:00 2001 From: hates Date: Mon, 13 Nov 2017 15:55:34 +0300 Subject: [PATCH] babel-polyfill added and promise-polyfill removed --- package.json | 2 +- src/utils/fetch.js | 4 ---- webpack.config.js | 2 +- 3 files changed, 2 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 0afabf963..fbe5c4cbb 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,6 @@ "codemirror-formatting": "^1.0.0", "font-awesome": "^4.7.0", "keymaster": "^1.6.2", - "promise-polyfill": "^6.0.2", "spectrum-colorpicker": "^1.8.0", "underscore": "^1.8.3" }, @@ -26,6 +25,7 @@ "babel-core": "^6.24.1", "babel-loader": "^7.0.0", "babel-plugin-transform-object-rest-spread": "^6.26.0", + "babel-polyfill": "^6.26.0", "babel-preset-env": "^1.6.1", "chai": "^4.1.2", "cross-env": "^5.0.5", diff --git a/src/utils/fetch.js b/src/utils/fetch.js index 33bdd5ebd..8bd3272a7 100644 --- a/src/utils/fetch.js +++ b/src/utils/fetch.js @@ -1,7 +1,3 @@ -import Promise from 'promise-polyfill'; - -window.Promise = window.Promise || Promise; - export default typeof fetch == 'function' ? fetch.bind() : (url, options) => { return new Promise((res, rej) => { const req = new XMLHttpRequest(); diff --git a/webpack.config.js b/webpack.config.js index 0f875b65f..c2a6d8d04 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -28,7 +28,7 @@ plugins.push(new webpack.ProvidePlugin({ })); module.exports = { - entry: './src', + entry: ['babel-polyfill', './src'], output: { filename: './dist/' + name + '.min.js', library: 'grapesjs',