API 參考

@univerjs/rpc-node

此 API 頁面目前提供英文內容。程式碼簽名與識別符不隨介面語言變更。

Node.js RPC plugins for Univer main-thread and worker communication.

TypeScript
import { fileURLToPath } from 'node:url'import { UniverRPCNodeMainPlugin } from '@univerjs/rpc-node'univer.registerPlugin(UniverRPCNodeMainPlugin, {  workerSrc: fileURLToPath(new URL('./worker.js', import.meta.url)),})

workerSrc is required when the main-thread plugin starts. Build the following worker entry separately and point workerSrc to its output.

TypeScript
import { UniverRPCNodeWorkerPlugin } from '@univerjs/rpc-node'univer.registerPlugin(UniverRPCNodeWorkerPlugin)

你覺得這篇文檔如何?

© 2026 DreamNum Co., Ltd.