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.
Activity
MarkPieszak commentedon Oct 6, 2016
Is this something new they implemented? Thought it always worked with IE!
jongalloway commentedon Oct 6, 2016
EventSource doesn't work in IE, and is still just in "Under Consideration" status for Edge.
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.
SteveSandersonMS commentedon Oct 10, 2016
Thanks @jongalloway - have added that one and it works.
Make the fix for #365 not be a breaking change (at least, for the con…
JohnGalt1717 commentedon Nov 1, 2016
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.
antmdvs commentedon Nov 1, 2016
How do you know this? Are you seeing this message in the browser's console when you refresh your page?
JohnGalt1717 commentedon Nov 1, 2016
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.
SteveSandersonMS commentedon Nov 1, 2016
The latest template does include the
event-sourcepolyfill - it's just not published to the VS gallery yet.If you want to run the latest template, please use the Yeoman generator (
npm install -g yo generator-aspnetcore-spathen runyo aspnetcore-spa).dkent600 commentedon Jul 14, 2017
@SteveSandersonMS I am using the latest template (for Aurelia) and it does not include a dependency on the eventsource-polyfill.
.