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

引用第三方组件vant-weapp时样式导入错误 #758

Closed
aiaisl opened this issue Oct 2, 2018 · 0 comments
Closed

引用第三方组件vant-weapp时样式导入错误 #758

aiaisl opened this issue Oct 2, 2018 · 0 comments

Comments

@aiaisl
Copy link

aiaisl commented Oct 2, 2018

问题描述
导入vant-weapp后,使用在taro中使用usingComponents导入组件,组件本身被导入成功,组件内部引用的样式没有被导入到dist目录中,导致小程序开发者工具报错

File not found: ../common/index.wxss

[问题描述]

复现步骤

  1. 开始一个taro项目
  2. 复制vant-weapp项目到src中,使用usingComponents导入button组件
  3. 可以看到编译成功
  4. 小程序开发者工具报错,dist目录中vant-weapp/dist/common/index.wxss不存在
config: Config = {
    navigationBarTitleText: '首页',
    usingComponents: {
      "van-button": "../../vant-weapp/dist/button"
    }
  }

期望行为
common/index.wxss的内容应该被导入到dist/common中

报错信息

Error:
in File: ./components-libs/vant-weapp/dist/button/index.wxss

File not found: ../common/index.wxss
编译 .wxss 文件错误,错误信息如上,可在控制台查看更详细信息

系统信息

  • 操作系统: [macOs 10.13.2]
  • Taro 版本 [1.0.7]
  • Node.js 版本 [v9.2.0]
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

1 participant