We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
比如我现在有一个会议的项目,在入会前的预览页只希望使用媒体相关的API,如 trtc.startLocalVideo ,现在 SDK 所有的方法都在 TRTC 上,我应该怎样做 Tree Shaking ?
trtc.startLocalVideo
The text was updated successfully, but these errors were encountered:
你好,SDK 是经过混淆压缩的,没办法 Tree Shaking。
5.0 版本的 SDK 只保留了核心通话相关的 API,其他功能以插件形式提供,例如美颜、混音、AI 降噪。
Sorry, something went wrong.
Tree Shaking 和 代码是否混淆压缩应该没有关系吧?
如果不支持Tree Shaking的话,打出 ESM 的包意义何在?
Tree Shaking 和 代码是否混淆压缩应该没有关系吧? 如果不支持Tree Shaking的话,打出 ESM 的包意义何在?
你好,我理解您的需求是:业务侧没使用到的 API 不需要进行打包。
目前 SDK 是混淆压缩后,以单个主包 + n 个插件包的形式提供的,主包提供核心的音视频通话功能,不能再进一步 Tree Shaking 了。
ESM 包保留了 ES6 的语法,为了支持业务侧在 ESM 模块的项目中使用。 默认的 trtc.js 是 UMD 模块的,做了 ES6 转 ES5 的处理。
No branches or pull requests
比如我现在有一个会议的项目,在入会前的预览页只希望使用媒体相关的API,如
trtc.startLocalVideo
,现在 SDK 所有的方法都在 TRTC 上,我应该怎样做 Tree Shaking ?The text was updated successfully, but these errors were encountered: