问题记录:Conflict: Multiple assets emit different content to the same filename index.html

报错原因文件重名。

解决方法:

第一步:public/index.html 重命名=>index.ejs

第二步:nodemodules/webpack/bin/webpack.js中添加

    html: { template: './src/index.ejs' }

第三步:重启项目

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
这个错误是因为在项目中存在多个文件向同一个文件名index.html输出不同的内容。这通常是由于配置问题造成的。一种可能性是,在使用vue-cli创建项目时,可能存在多个文件名重名。另一种可能性是,可能存在其他文件配置问题。解决这个问题有两种方案可以尝试: 1. 检查项目中是否存在重名的文件,并根据需要进行重命名,确保每个文件都有唯一的名称。 2. 检查项目的配置文件,特别是webpack配置文件,确保没有重复的输出文件名或冲突的配置。需要仔细检查配置文件中的输出路径和文件名配置,确保它们是唯一的。 通过采取以上措施,您应该能够解决这个错误并成功运行项目。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* *3* [两种方案解决ERROR in Conflict: Multiple assets emit different content to the same filename index....](https://blog.csdn.net/weixin_43405300/article/details/125712080)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 50%"] - *2* [出现报错:ERROR in Conflict: Multiple assets emit different content to the same filename index.html](https://blog.csdn.net/weixin_52979063/article/details/130397890)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 50%"] [ .reference_list ]

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值