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的commonjs版本wxs依赖文件未拷贝到dist目录 #1472

Closed
huixisheng opened this issue Dec 12, 2018 · 5 comments
Closed
Assignees
Labels
enhancement New feature or request

Comments

@huixisheng
Copy link
Contributor

问题描述
image

复现步骤
vant-weapp打包成commonjs版本,引用icon组件

期望行为
正常运行

系统信息

  • Taro 版本 [1.2.0-beta.14]
  • 报错平台 [weapp]

补充信息
watch模式编辑器保存common/utils.wxs可以正常运行

@taro-bot
Copy link

taro-bot bot commented Dec 12, 2018

欢迎提交 Issue~

如果你提交的是 bug 报告,请务必遵循 Issue 模板的规范,尽量用简洁的语言描述你的问题,最好能提供一个稳定简单的复现。🙏🙏🙏

如果你的信息提供过于模糊或不足,或者已经其他 issue 已经存在相关内容,你的 issue 有可能会被关闭。

Good luck and happy coding~

@luckyadam
Copy link
Member

wxs 文件没有处理,通过配置 copy 来解决

@luckyadam luckyadam added enhancement New feature or request CLI labels Dec 12, 2018
@taro-bot
Copy link

taro-bot bot commented Dec 12, 2018

CC @luckyadam

@YpchenLove
Copy link

我也遇到相同的问题,在微信小程序里src下组件里的wxs没有被copy到dist里的组件中~
image
上图是src下的组件源码
下图是build后的组件代码,缺少了wxs部分。
gfoku2jjto0 x 0 fmt y7
希望taro团队能够支持微信小程序的这一特性~,3q~

@huixisheng
Copy link
Contributor Author

临时解决方案

  copy: {
    patterns: [
      {
        from: 'src/libs/vant-weapp/dist/common/utils.wxs',
        to: 'dist/libs/vant-weapp/dist/common/utils.wxs',
      },
    ],
    options: {
    }
  },
   'pxtransform': {
          enable: true,
          config: {
            designWidth: 750,
            platform: 'weapp',
            selectorBlackList: [/^.van-.*?$/, /^.weui-.*?$/],
          },
        },

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

No branches or pull requests

5 participants