wepy icon indicating copy to clipboard operation
wepy copied to clipboard

全局配置使用组件 组件未被打包进入weapp内2.0

Open chenyu445 opened this issue 4 years ago • 3 comments

##阅读完后请在提交的issue中删除以上内容,包括分割线

DELETE THE INFORMATION ABOVE(INCLUDE THE SEPARATION LINE) BEFORE YOU OPEN AN ISSUE


Description

在 app.wpy中配置全局组件的了以后,components没有被打包到weapp里面,导致在页面调用组件的时候出现找不到组件的错误

[Description of the issue]

Environment

  • Platform: [开发者工具]
  • wepy-cli version: [2.0.0-alpha.24]
  • wepy version: [2.0.0-alpha.9]

Reproduce

[如何重现问题] app.wpy内配置组件信息,然后再index页面使用组件

usingComponents:{
    panel: "~@/components/panel"
  }

运行

npm run dev

查看开发工具,报错

jsEnginScriptError
Component is not found in path "pages/..\components\panel" (using by "pages/index");onAppRoute
Error: Component is not found in path "pages/..\components\panel" (using by "pages/index")

### Observed Results

  [实际表现]
  无法加载组件且报错,查看打包后的weapp文件夹,发现没有components文件夹,及组件没有被打包进入weapp
  
### Expected Results

  [期望表现]
  
  [Expected Results]
  组件被打包进入weapp文件夹,组件可以正常使用
#2599 

chenyu445 avatar Apr 02 '20 17:04 chenyu445

+1 wepy-cli version: [2.0.0-alpha.20] wepy version: [2.0.0-alpha.14]

yokingma avatar Apr 17 '20 08:04 yokingma

+1 wepy-cli version: [2.0.0-alpha.28] wepy version: [2.0.0-alpha.16]

sinceow avatar Apr 30 '20 05:04 sinceow

删除weapp,重新build下就可以

truexu0529 avatar Jun 10 '20 09:06 truexu0529