Skip to content
This repository was archived by the owner on Sep 3, 2026. It is now read-only.
This repository was archived by the owner on Sep 3, 2026. It is now read-only.

EventSource Polyfill #11

Closed
Closed

Description

@insin

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);
   };
 }

Activity

  1. glenjamin commented on Sep 9, 2015

    @glenjamin
    Contributor

    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

  2. glenjamin commented on Sep 9, 2015

    @glenjamin
    Contributor

    Will take a PR, or add something myself soonish.

  3. glenjamin commented on Sep 12, 2015

    @glenjamin
    Contributor

    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)

  4. glenjamin commented on Sep 13, 2015

    @glenjamin
    Contributor

    Released as v2.0.1

  5. glenjamin commented on Sep 15, 2015

    @glenjamin
    Contributor

    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

  6. insin commented on Sep 15, 2015

    @insin
    ContributorAuthor

    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.

  7. glenjamin commented on Sep 19, 2015

    @glenjamin
    Contributor

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

    Let me know if you think more is needed.

  8. glenjamin commented on Sep 19, 2015

    @glenjamin
    Contributor

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions