Multiple assets emit different content to the same filename index.html解决方法

编程知识 更新时间:2023-04-05 05:27:04

小白一个,跟着网上的教程配置了Vue,到npm run serve时出现了Multiple assets emit different content to the same filename index.html的报错。网上搜了一圈,大概知道原因是打包时重名了,但CSDN上的解决方案都试了一遍,并没有什么*用,bug越修越多……直到看到roadhog2配置项html,报错:Conflict: Multiple assets emit to the same filename index.html: · Issue #709 · sorrycc/roadhog · GitHub这个,终于解决了问题。

解决方法是把index.html重命名为index.ejs,在node_nodules/webpack/bin/webpack.js中加入

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

更多推荐

Multiple assets emit different content to the same filename index.html解决方法

本文发布于:2023-04-05 05:27:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/b80e4767838fcfb8c61e206c9a937ec7.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:解决方法   emit   assets   Multiple   content

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!

  • 45007文章数
  • 14阅读数
  • 0评论数