Skip to content

Commit

Permalink
fix(mini-runner): 兼容百度小程序使用usingSwanComponents配置 引入新的动态组件 (#11876)
Browse files Browse the repository at this point in the history
* fix(mini-runner): 兼容百度小程序使用usingSwanComponents配置 引入新的动态组件

* fix(css-to-react-native): propertyValue remove !import (#11870)

Co-authored-by: tony chen <329604487@qq.com>

* fix(rn): thisExpression error (#11902)

* feat(weapp): add props for weapp input (#11895)

* feat(weapp): add props for weapp input

* fix(weapp): update snapshots

Co-authored-by: chenjiajian <798095202@qq.com>

* fix(css-to-react-native): 修复 border-color 设置 rgb(a) 报错问题 (#11916)

* fix(h5): Swiper 组件随着 tab 页面切换,总是跳到最后一个元素开始轮播 (#11927)

* fix(alipay): picker-view-column 类名(className)和style 编译后未添加上的问题

* fix(h5): 修复swiper 组件随着 tab 页面切换,总是跳到最后一个元素开始轮播的问题

* fix(components): update react-component swiper

* fix(types): rm useless

Co-authored-by: rwang9 <rwang9@trip.com>
Co-authored-by: chenjiajian <798095202@qq.com>
Co-authored-by: Zakary <zakarycode@gmail.com>

* fix(mini-runner): 兼容百度小程序使用usingSwanComponent 采用正则判断

Co-authored-by: yuconora <yuconora@gmail.com>
Co-authored-by: chenjiajian <798095202@qq.com>
Co-authored-by: 早道 <shinken008@gmail.com>
Co-authored-by: tony chen <329604487@qq.com>
Co-authored-by: hsingyin <582136509@qq.com>
Co-authored-by: wrmtayiya <2418140141@qq.com>
Co-authored-by: rwang9 <rwang9@trip.com>
Co-authored-by: Zakary <zakarycode@gmail.com>
  • Loading branch information
9 people authored Jun 15, 2022
1 parent 9a020af commit 709fb80
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/taro-mini-runner/src/plugins/MiniPlugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -666,7 +666,10 @@ export default class TaroMiniPlugin {
const filePath = file.path
const fileConfigPath = file.isNative ? this.replaceExt(filePath, '.json') : this.getConfigFilePath(filePath)
const fileConfig = readConfig(fileConfigPath)
const usingComponents = fileConfig.usingComponents
// 修复百度小程序内容服务组件使用新的引入方式"usingSwanComponents"导致的无法编译到页面配置json的问题
// 获取 fileConfig 里面的匹配 "/^using[A-Za-z]*Components$/"的字段,之后合并到 usingComponents 中
const usingArray = Object.keys(fileConfig).filter(item => /^using[A-Za-z]*Components$/.test(item)).map(item => fileConfig[item])
const usingComponents = usingArray.length < 1 ? undefined : Object.assign({}, ...usingArray)

// 递归收集依赖的第三方组件
if (usingComponents) {
Expand Down

0 comments on commit 709fb80

Please sign in to comment.