# How to add EventSource polyfill to WebPack?

**URL:** https://discourse.roots.io/t/how-to-add-eventsource-polyfill-to-webpack/17133
**Category:** sage
**Tags:** webpack
**Created:** 2019-11-21T16:17:41Z
**Posts:** 1

## Post 1 by @Bezelinja — 2019-11-21T16:17:41Z

Hi there,

I got some JS code not working properly in MS Edge. Ughhh… I get “webpack-hot-middleware’s client requires EventSource to work. You should include a polyfill if you want to support this browser” in the console and I figure out that I need a polyfill (i.e. eventsource-polyfill npm) but I have no clue how to add it to Webpack.

I tried adding to ‘main.js’ but get the same error in console.

Any help would be more than appreciated.

Thanks!
