Browse Source
Add babel-polyfill and remove promise-polyfill
pull/517/merge
Artur Arseniev
9 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with
2 additions and
6 deletions
-
package.json
-
src/utils/fetch.js
-
webpack.config.js
|
|
@ -18,7 +18,6 @@ |
|
|
"codemirror-formatting": "^1.0.0", |
|
|
"codemirror-formatting": "^1.0.0", |
|
|
"font-awesome": "^4.7.0", |
|
|
"font-awesome": "^4.7.0", |
|
|
"keymaster": "^1.6.2", |
|
|
"keymaster": "^1.6.2", |
|
|
"promise-polyfill": "^6.0.2", |
|
|
|
|
|
"spectrum-colorpicker": "^1.8.0", |
|
|
"spectrum-colorpicker": "^1.8.0", |
|
|
"underscore": "^1.8.3" |
|
|
"underscore": "^1.8.3" |
|
|
}, |
|
|
}, |
|
|
@ -26,6 +25,7 @@ |
|
|
"babel-core": "^6.24.1", |
|
|
"babel-core": "^6.24.1", |
|
|
"babel-loader": "^7.0.0", |
|
|
"babel-loader": "^7.0.0", |
|
|
"babel-plugin-transform-object-rest-spread": "^6.26.0", |
|
|
"babel-plugin-transform-object-rest-spread": "^6.26.0", |
|
|
|
|
|
"babel-polyfill": "^6.26.0", |
|
|
"babel-preset-env": "^1.6.1", |
|
|
"babel-preset-env": "^1.6.1", |
|
|
"chai": "^4.1.2", |
|
|
"chai": "^4.1.2", |
|
|
"cross-env": "^5.0.5", |
|
|
"cross-env": "^5.0.5", |
|
|
|
|
|
@ -1,7 +1,3 @@ |
|
|
import Promise from 'promise-polyfill'; |
|
|
|
|
|
|
|
|
|
|
|
window.Promise = window.Promise || Promise; |
|
|
|
|
|
|
|
|
|
|
|
export default typeof fetch == 'function' ? fetch.bind() : (url, options) => { |
|
|
export default typeof fetch == 'function' ? fetch.bind() : (url, options) => { |
|
|
return new Promise((res, rej) => { |
|
|
return new Promise((res, rej) => { |
|
|
const req = new XMLHttpRequest(); |
|
|
const req = new XMLHttpRequest(); |
|
|
|
|
|
@ -28,7 +28,7 @@ plugins.push(new webpack.ProvidePlugin({ |
|
|
})); |
|
|
})); |
|
|
|
|
|
|
|
|
module.exports = { |
|
|
module.exports = { |
|
|
entry: './src', |
|
|
entry: ['babel-polyfill', './src'], |
|
|
output: { |
|
|
output: { |
|
|
filename: './dist/' + name + '.min.js', |
|
|
filename: './dist/' + name + '.min.js', |
|
|
library: 'grapesjs', |
|
|
library: 'grapesjs', |
|
|
|