Sfoglia il codice sorgente

bug(polyfiller): check for `Promise` on global/window object

bubble
kyle 6 anni fa
committed by GitHub
parent
commit
0751022b77
Non sono state trovate chiavi note per questa firma nel database ID Chiave GPG: 4AEE18F83AFDEB23
2 ha cambiato i file con 4 aggiunte e 1 eliminazioni
  1. +3
    -1
      src/polyfills.js
  2. +1
    -0
      webpack-hot-dev-server.config.js

+ 3
- 1
src/polyfills.js Vedi File

@@ -1,6 +1,8 @@
// Promise global, Used ( at least ) by 'whatwg-fetch'. And required by IE 11

if(typeof Promise === "undefined") {
import win from "core/window"

if(typeof win.Promise === "undefined") {
require("core-js/fn/promise")
}



+ 1
- 0
webpack-hot-dev-server.config.js Vedi File

@@ -67,6 +67,7 @@ module.exports = require("./make-webpack-config")(rules, {
publicPath: "/",
noInfo: true,
hot: true,
disableHostCheck: true, // for development within VMs
stats: {
colors: true
},


Caricamento…
Annulla
Salva