Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

全局配置使用组件无效 #2477

Closed
9monsters opened this issue Nov 6, 2019 · 3 comments
Closed

全局配置使用组件无效 #2477

9monsters opened this issue Nov 6, 2019 · 3 comments

Comments

@9monsters
Copy link

Description

[问题描述:站在其它人的角度尽可能清晰地、简洁地把问题描述清楚]

在app.wpy文件中增加

  usingComponents: {
    'van-icon': 'module:vant-weapp/dist/icon'
  },

生成的app.json 没有该配置

Environment

  • Platform: [开发者工具]
  • Platform version: [对应工具或者iOS或者Andriod的版本号]
  • Wechat version: [7.0.8]
  • wepy-cli version: [2.0.0-alpha.17]
  • wepy version: [@wepy/core": "^2.0.0-alpha.11]

Reproduce

在app.wpy文件中增加

  usingComponents: {
    'van-icon': 'module:vant-weapp/dist/icon'
  },

Observed Results

生成的app.json 没有该配置

Expected Results

生成的app.json 有该配置

Relevant Code / Logs

@daiyifei
Copy link

确实有这个问题,只能在每页单独配置,十分麻烦

@Gcaufy Gcaufy closed this as completed in 64ac431 Dec 1, 2019
@Gcaufy
Copy link
Collaborator

Gcaufy commented Dec 1, 2019

module 类型的 components 在 app 中声明无效。其它类型的 components 可以正常工作 。
在 next 版中已 fix.

npm i @wepy/[email protected] --save-dev

@Lolingew
Copy link

module 类型的 components 在 app 中声明无效。其它类型的 components 可以正常工作 。
在 next 版中已 fix.

npm i @wepy/[email protected] --save-dev

2.1.0版本又没法用module了,还能咋整?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants