WebPack HMR with Edge

Tags: WebPack, hot module reload, HMR, Aurelia

To get WebPack hot module reload to work with Edge you need a polyfill.

Add it to your project:

npm i event-source-polyfill

Then add it to your vendor.config.js file at the end of the vendor array.

    entry: {
      vendor: [

Or with webpack4

    plugins: [
      new webpack.DefinePlugin({ IS_DEV_BUILD: JSON.stringify(isDevBuild) }),
      new webpack.ProvidePlugin({
        "window.EventSource": ['event-source-polyfill', 'EventSourcePolyfill'],
        $: "jquery", jQuery: "jquery", "window.jQuery": "jquery"

No Comments