Search code examples
angularwebpackwebpack-dev-serverwebpack-hmrhot-module-replacement

Webpack adding duplicates of runtime into bundle


Does anyone know why I am getting duplicates of the webpack runtimes in the bundle?

It's adding multiple numbers after the ? and the browser is seeing them as new files.

  • dev-server.js?
  • dev-server.js?52d4
  • dev-server.js?53d4*

webpack-dupes

See the file tree on the left: webpack-dupes2

Why is it doing this? I just want one copy of the file in the bundle.


Solution

  • Webpack sets up a client/server pair for each entry by design. That's why you are seeing all of those prints. Given each entry happens to depend on jwt-decode, you also get those warnings.

    Here's the relevant code. The code was introduced as a part of a bug fix.