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

feat(h5): 支持 canIUse 方法 #13819

Merged
merged 23 commits into from
Jun 8, 2023
Merged

feat(h5): 支持 canIUse 方法 #13819

merged 23 commits into from
Jun 8, 2023

Conversation

ZakaryCode
Copy link
Contributor

@ZakaryCode ZakaryCode commented May 10, 2023

这个 PR 做了什么? (简要描述所做更改)

  • 支持 web 端 canIUse 方法,通过 tsc 生成组件库和 API 支持的 definition.json
  • 修改 babel-plugin-transform-taroapi 插件,支持通过 definition 将代码中存在的 canIUse 转换为布尔值

    用于避免引入 definition.json 导致的代码体积增大,不支持通过变量定义 scheme 的情况

  • taro-h5、taro-platform-h5 中 rollup 升级至 v3,并改用 rollup.config.ts

当前方案不支持在编译时注入的方法(包括钩子等)

这个 PR 是什么类型? (至少选择一个)

  • 新功能(Feature)
  • TypeScript 类型定义修改(Typings)
  • 文档修改(Docs)
  • 代码风格更新(Code style update)

这个 PR 涉及以下平台:

  • Web 平台(H5)

@ZakaryCode ZakaryCode marked this pull request as ready for review May 11, 2023 05:35
@ZakaryCode ZakaryCode added A-api Area - H5 API 相关 T-h5 Target - 编译到 H5 labels May 12, 2023
@ZakaryCode ZakaryCode added this to the 3.6.8 milestone May 29, 2023
@ZakaryCode ZakaryCode force-pushed the feat/h5-apis branch 2 times, most recently from d620a19 to c2a5e9d Compare June 8, 2023 07:10
@ZakaryCode ZakaryCode merged commit 51fffc9 into next Jun 8, 2023
@ZakaryCode ZakaryCode deleted the feat/h5-apis branch June 8, 2023 09:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-api Area - H5 API 相关 T-h5 Target - 编译到 H5
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants