The plugin compiler spawned esbuild through app.asar, and the subprocess imported the React client barrel. Point esbuild at the unpacked binary, add a react-free @paseo/plugin/server entry, and pass a typed PluginTheme so plugin UI follows the active theme on desktop and mobile.
9 lines
249 B
TypeScript
9 lines
249 B
TypeScript
import { defineRpc } from "@paseo/plugin/server";
|
|
import { z } from "zod";
|
|
|
|
export const incrementRpc = defineRpc({
|
|
name: "increment",
|
|
input: z.object({ value: z.number() }),
|
|
output: z.object({ value: z.number(), handledBy: z.string() }),
|
|
});
|