You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 8, 2020. It is now read-only.
Repository navigation
This repository was archived by the owner on Apr 8, 2020. It is now read-only.
Add EventSource polyfill so that webpack HMR can work on IE/Edge #365
I've looked at this a bit before, I think this might be the most popular polyfill - it's been maintained for 4+ years and supports a lot of browsers, including IE11 and Edge.
I'm confused. I just downloaded the template pack and started it up in IE and Edge and neither have the event-source polyfill added by default. I added it to the webpack.config.vendor.js manually and there's no difference.
Yes I'm seeing the message in the browser console in both Edge and IE.
Yes I should include a polyfill. Actually a Microsoft development effort should include the polyfill by default because you know YOUR browsers don't work without it and telling people to use GOOGLE'S browser in a Microsoft development environment is STUPID on Microsoft's part because it ensures that developers don't need your tools at all and thus have no reason to develop on Windows or use Visual Studio. But I digress...
As I noted I added the npm for eventsource-polyfill from the page you noted and then put it in the webpack.vendor.config.js file in the vendors section. It doesn't complain but after rebuilding the webpack file and running it again, there is no difference at all and the error message still shows up in the console for both IE and Edge.
So yes, your templates should have this and any other polyfills for IE 11+ development installed automatically. (or at the very least give a options box when you create the template) Further if you're going to instruct someone to "include a polyfill" it might be helpful to tell them HOW to do so given the complexity of how this project is setup versus instructional materials on webpack's site, and even MVC.net etc.
Currently, HMR fails on IE/Edge because http://caniuse.com/#feat=eventsource