doubleyong
管理员
管理员
  • 最后登录2025-12-02
  • 发帖数1198
  • 最爱沙发
  • 喜欢达人
  • 原创写手
  • 社区居民
  • 忠实会员
阅读:8717回复:0

[其它]webpack bug:Conflict: Multiple chunks emit assets to the same filename index.js (chunks 0 and 1)

楼主#
更多 发布于:2019-07-23 15:16
webpack入口文件时,使用json对象指定入口文件,如下:
entry: {
       page1:"./src/index.js",
       page2:"./src/index2.js"
   },
   //出口
   output: {
       filename: './index.js'
   },
   mode:"production"
错误:
ERROR in chunk page2 [entry]
index.js
Conflict: Multiple chunks emit assets to the same filename index.js (chunks 0 and 1)
解决方案:
output:{
           path:path.resolve(__dirname,'dist'),
           filename:'[name].js'
       }
知识需要管理,知识需要分享
游客


返回顶部

公众号

公众号