eleme / morjs

基于小程序 DSL(微信、支付宝)的,可扩展的多端研发框架,支持一键将微信或支付宝小程序转换为微信、支付宝、百度、字节、QQ、快手、淘宝、钉钉等小程序 或 Web 应用。
https://mor.ele.me/
MIT License
1.66k stars 108 forks source link

vant 打包下 wxs 依赖缺失问题 #133

Closed yzend closed 9 months ago

yzend commented 9 months ago

Describe the bug 在使用vantui库时候,如果主包引用了 一个 vant-a组件,子包引用vant-b组件(需要是notice这类wxs还依赖公共wxs的组件),这个时候进行 build,产物中,子包的npm_package 中 vant缺少公共的wxs文件导致 函数不存在。

To Reproduce 初始化项目,添加 @vant/weapp 在主页面 pages/index 下引入 vant-icon 在子包页面中 src/subPackages/subPackage1/demo 中添加 van-notice-bar组件 然后执行 compile 子包的npm_components下 vant的 van-notice-bar 组件缺少公共的 wxs引入

Expected behavior 将公用的 wxs引入到子包的 npm_components中 或者 针对van这类ui组件同一放在 主包的 npm_components中

Screenshots If applicable, add screenshots to help explain your problem. image

代码示例 myapp.zip

Desktop (please complete the following information):

Smartphone (please complete the following information):

Additional context Add any other context about the problem here.

hwaphon commented 9 months ago

https://github.com/eleme/morjs/releases/tag/v1.0.91

V1.0.91 版本已修复

nile52 commented 3 weeks ago

morjs+vant weapp,可以运行在web端吗