Browse Source

babel-polyfill added and promise-polyfill removed

pull/515/head
hates 8 years ago
parent
commit
16eee6c4d7
  1. 2
      package.json
  2. 4
      src/utils/fetch.js
  3. 2
      webpack.config.js

2
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",

4
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();

2
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',

Loading…
Cancel
Save