Webpack将运行时的重复项添加到捆绑中 [英] Webpack adding duplicates of runtime into bundle
问题描述
有人知道为什么我在捆绑包中得到了webpack运行时的副本吗?
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 *
请参阅左侧的文件树:
See the file tree on the left:
为什么要这样做?我只想要捆绑包中的文件的一个副本.
Why is it doing this? I just want one copy of the file in the bundle.
推荐答案
Webpack会根据设计为每个entry
设置一个客户端/服务器对.这就是为什么您看到所有这些印刷品的原因.鉴于每个条目都恰好取决于 jwt-decode ,您也会收到这些警告.
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.
这篇关于Webpack将运行时的重复项添加到捆绑中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!