@converse/headless

中文文档
14.0.1发布于 2026/10/17MPL-2.0TypeScriptES Module近 30 天下载 2014

Converse.js Headless build

原始使用文档

Converse Headless

Converse has a special build called the headless build.

You can generate it yourself by running npm run build:headless in the root of the converse.js repo.

The headless build is a bundle of all the non-UI parts of Converse, and its aim is to provide you with an XMPP library (and application) on which you can build your own UI.

It's also installable with NPM/Yarn as @converse/headless.

The main distribution of Converse relies on the headless build.

The file src/headless/index.js is used to determine which plugins are included in the build.

Runtime files

When serving or bundling @converse/headless, these companion files must be available at runtime:

FilePurpose
libomemo.esm.min.jsGPL-licensed crypto library, loaded on-demand when OMEMO encryption is used
curve25519_compiled.wasmWebAssembly crypto primitives, loaded by libomemo.esm.js
emoji.jsonEmoji metadata for the built-in emoji picker

All files must live in the same directory. For CDN/self-host deployments, copy the entire dist/ directory. When using a bundler, ensure these files are treated as external (not bundled).

版本与发布记录

@converse/headless 共发布 46 个版本,首次发布于 2018/10/12;过去 12 个月发布了 8 个版本。

版本发布日期距今
14.0.1latest2026/10/1728 天前
14.0.02026/06/264 个月前
14.0.0-beta.4beta2026/06/224 个月前
14.0.0-beta.32026/06/194 个月前
14.0.0-beta.22026/06/184 个月前
14.0.0-beta.12026/06/184 个月前

关于 @converse/headless 的常见问题

@converse/headless 是什么?

Converse.js Headless build

如何安装 @converse/headless?

在项目目录运行 npm install @converse/headless,或使用 pnpm add / yarn add / bun add。

@converse/headless 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@converse/headless 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@converse/headless 可以商用吗?

@converse/headless 使用 MPL-2.0 许可。弱 Copyleft:可以商用,也可以和闭源代码一起使用;但如果分发时修改了 MPL 授权的文件,这些文件的修改需以 MPL 开源。以上为概括,不构成法律意见,请以许可原文为准。

@converse/headless 的下载量有多少?

根据 npm 官方下载统计,@converse/headless 在 2026/10/11 – 2026/11/09 这 30 天内被下载 2,014 次,日均约 67 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@converse/headless 还在维护吗?

最新版本 14.0.1 发布于 2026/10/17(28 天前);至今共发布 46 个版本,其中过去 12 个月发布了 8 个;首次发布于 2018/10/12。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。