Webpack将运行时的重复项添加到捆绑中 [英] Webpack adding duplicates of runtime into bundle

查看:134
本文介绍了Webpack将运行时的重复项添加到捆绑中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人知道为什么我在捆绑包中得到了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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆