xvector
xvector
  • 发布:2024-01-06 19:48
  • 更新:2024-01-06 20:18
  • 阅读:324

集成uni-im遇到编译问题

分类:uni-app
19:42:50.150 [vite]: Rollup failed to resolve import "@dcloudio/uni-ui/lib/uni-im-list-item/uni-im-list-item.vue" from "/src/uni_modules/uni-im/components/uni-im-msg-list/uni-im-msg-list.vue".  
19:42:50.150 This is most likely unintended because it can break your application at runtime.  
19:42:50.156 If you do want to externalize this module explicitly add it to  
19:42:50.157 `build.rollupOptions.external`

添加uni-im之后编译出现如上问题

发现是因为配置了

  "easycom": {  
    "autoscan": true,  
    "custom": {  
      // uni-ui 规则如下配置  
      "^uni-(.*)": "@dcloudio/uni-ui/lib/uni-$1/uni-$1.vue",  
     }  
  },

这尼玛让我怎么搞?

2024-01-06 19:48 负责人:无 分享
已邀请:
xvector

xvector (作者)

"easycom": {
"autoscan": true,
"custom": {
// uni-ui 规则如下配置
"^uni-(?!im-list)(.*)": "@dcloudio/uni-ui/lib/uni-$1/uni-$1.vue",
}
},

要回复问题请先登录注册