From 7a30a7e37f4744023d08b07c59cd47a75ddb0bdb Mon Sep 17 00:00:00 2001 From: SleepWalker Date: Wed, 12 Apr 2017 21:34:12 +0300 Subject: [PATCH] #316: this time realy fixed Edge --- src/index.ejs | 12 ++++++++++++ src/polyfills.js | 15 +-------------- 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/src/index.ejs b/src/index.ejs index d0d4222..4be4a53 100644 --- a/src/index.ejs +++ b/src/index.ejs @@ -6,9 +6,21 @@ + <% if (htmlWebpackPlugin.files.favicon) { %> <% } %> + + diff --git a/src/polyfills.js b/src/polyfills.js index f794c99..cdadd64 100644 --- a/src/polyfills.js +++ b/src/polyfills.js @@ -1,20 +1,7 @@ import 'babel-polyfill'; +import 'whatwg-fetch'; import { shim as shimPromiseFinaly } from 'promise.prototype.finally'; -const isEdge = /Edge\//.test(navigator.userAgent); -if (isEdge) { - // Edge has a broken fetch implementation, so forcing the polyfill - // https://www.reddit.com/r/webdev/comments/57ii4f/psa_edge_14_ships_a_broken_windowfetch/ - // https://github.com/aurelia/fetch-client/issues/81 - // https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/9370062/ - // https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/7773267/ - Reflect.deleteProperty(window, 'fetch'); -} - -// using require instead of import, because import is hoisting to the top -// so that our fetch hack for Edge won't work -require('whatwg-fetch'); - shimPromiseFinaly(); // allow :active styles in mobile Safary