@uigen-dev/target-electron
v0.4.1
Published
Electron desktop shell for UIGen React SPA
Readme
@uigen-dev/target-electron
Electron desktop shell for UIGen. Phase 1 wraps the existing React SPA by opening a BrowserWindow pointed at the CLI dev server.
Usage
From a UIGen project:
uigen serve ./openapi.yaml --target electron
uigen serve ./openapi.yaml --target electron --proxy-base http://localhost:8000In the monorepo, build this package first:
pnpm --filter @uigen-dev/target-electron buildHow it works
- The CLI runs the normal serve pipeline (spec processing, CSS/overrides injection,
/apiproxy). - The CLI starts the React SPA server on localhost.
- This package's Electron main process opens a window loading that URL.
The Electron shell does not embed the SPA or server logic. It is a thin host around the existing web target.
Requirements
- React renderer (
--renderer react, default) @uigen-dev/target-electroninstalled (workspace-linked in the monorepo)
