Search code examples
webpackwebpack-dev-serverwebpack-hmr

Webpack dev server bootstrapping twice


Webpack dev server is bootstrapping twice for an unknown reason. (Note that only the dev-server has this problem, if I bundle the files, everything runs ok).

I'm seeing this line executing twice:

// Load entry module and return exports
  return hotCreateRequire(790)(__webpack_require__.s = 790); 

I can also see this line two times in my browser log:

[HMR] Waiting for update signal from WDS...

These are the used versions

"webpack": "^2.1.0-beta.21"
"webpack-dev-server": "^2.1.0-beta.4",

Solution

  • I was using HtmlWebpackPlugin,

    using

    inject: false
    

    Did the magic as stated in this question:

    All my code runs twice when compiled by Webpack