Skip to content

EventSource Polyfill #11

@insin

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions