From 0751022b7751fd55fa05b14086e733a0bdc68338 Mon Sep 17 00:00:00 2001 From: kyle Date: Sat, 6 Jan 2018 00:19:29 -0600 Subject: [PATCH] bug(polyfiller): check for `Promise` on global/window object --- src/polyfills.js | 4 +++- webpack-hot-dev-server.config.js | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/polyfills.js b/src/polyfills.js index 312d88dc..54d99959 100644 --- a/src/polyfills.js +++ b/src/polyfills.js @@ -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") } diff --git a/webpack-hot-dev-server.config.js b/webpack-hot-dev-server.config.js index 8d3b591b..81abd40c 100644 --- a/webpack-hot-dev-server.config.js +++ b/webpack-hot-dev-server.config.js @@ -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 },