Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EventSource Polyfill #11

Closed
insin opened this issue Sep 9, 2015 · 8 comments
Closed

EventSource Polyfill #11

insin opened this issue Sep 9, 2015 · 8 comments

Comments

@insin
Copy link
Contributor

insin commented Sep 9, 2015

Could you include an EventSource polyfill for IE by default, or recommend one and document how to configure it?

I just got one working, but I had to modify middleware.js:

npm install eventsource-polyfill
  entry: [
    'eventsource-polyfill',
    'webpack-hot-middleware/client',
    './app/index.js'
  ],

Then because the polyfill in question tacks on some query parameters:

--- middleware.js
+++ middleware.js
@@ -26,7 +26,7 @@
     });
   });
   return function(req, res, next) {
-    if (req.url !== opts.path) return next();
+    if (req.path !== opts.path) return next();
     eventStream.handler(req, res);
   };
 }
@glenjamin
Copy link
Collaborator

Yep, happy to do this.

I didn't realise even new IE didn't support EventSource!

As this is mostly a dev tool, I think I'll just pull in a polyfill

@glenjamin
Copy link
Collaborator

Will take a PR, or add something myself soonish.

@glenjamin
Copy link
Collaborator

I've added this in 94da926 - can you confirm it's fixed @insin and i'll cut a release. (Don't have easy access to IE right now)

@glenjamin
Copy link
Collaborator

Released as v2.0.1

@glenjamin glenjamin reopened this Sep 15, 2015
@glenjamin
Copy link
Collaborator

Had a few reports of issues with this, so have deprecated v2.0.1 and released v2.0.2 which removes the polyfill (dfb7efb).

I'd like to bring this back in, but need to iron out the kinks

@insin
Copy link
Contributor Author

insin commented Sep 15, 2015

Not picking a particular polyfill to depend on would save a bunch of hassle in the long run (their bugs become your bugs... and IE-only ones at that 😄).

Documenting the need for one also provides a chance to point out potential bundling gotchas, and again those won't be your bugs, but the user's.

@glenjamin
Copy link
Collaborator

Added a troubleshooting guide that mentions this, and made sure querystring parameters are accepted.

Let me know if you think more is needed.

@glenjamin
Copy link
Collaborator

querystring changes released in v2.2.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants