For AI agents: the complete documentation index is available at /next/zh/llms.txt, the full documentation bundle is available at /next/zh/llms-full.txt, and this page is available as Markdown at /next/zh/api/genui/reactlynx/functions/buildReactLynx.md.
Lynx
  • 简体中文
  • 函数: buildReactLynx()

    buildReactLynx(source: ReactLynxSource, signal: AbortSignal, onStatus: (status: ReactLynxBuildStatus) => void): Promise<ReactLynxBuildAsset[]>

    在独立 Node.js 进程中将生成源码编译为 Web 和 Native 产物。

    参数

    参数类型描述
    sourceReactLynxSource经过 parseReactLynxSource 校验的完整两文件源码。
    signalAbortSignal取消排队或正在执行的编译。
    onStatus(status: ReactLynxBuildStatus) => void接收排队和编译进度。

    返回

    Promise<ReactLynxBuildAsset[]>

    全部构建产物,包括 main.web.js 和 main.lynx.js。

    备注

    打包服务端时将此入口保持为 external,确保相邻 worker 仍然可用。

    除非另有说明,本项目采用知识共享署名 4.0 国际许可协议进行许可,代码示例采用 Apache License 2.0 许可协议进行许可。