Coder Social home page Coder Social logo

Comments (3)

Rychou avatar Rychou commented on May 27, 2024

你好,SDK 是经过混淆压缩的,没办法 Tree Shaking。

5.0 版本的 SDK 只保留了核心通话相关的 API,其他功能以插件形式提供,例如美颜、混音、AI 降噪。

from trtc_web.

simo-an avatar simo-an commented on May 27, 2024

Tree Shaking 和 代码是否混淆压缩应该没有关系吧?

如果不支持Tree Shaking的话,打出 ESM 的包意义何在?

from trtc_web.

Rychou avatar Rychou commented on May 27, 2024

Tree Shaking 和 代码是否混淆压缩应该没有关系吧?

如果不支持Tree Shaking的话,打出 ESM 的包意义何在?

你好,我理解您的需求是:业务侧没使用到的 API 不需要进行打包。

目前 SDK 是混淆压缩后,以单个主包 + n 个插件包的形式提供的,主包提供核心的音视频通话功能,不能再进一步 Tree Shaking 了。

ESM 包保留了 ES6 的语法,为了支持业务侧在 ESM 模块的项目中使用。
默认的 trtc.js 是 UMD 模块的,做了 ES6 转 ES5 的处理。

from trtc_web.

Related Issues (14)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.