sitemana-widget-embed
v0.1.43
Published
Browser-ready public embed package for the Sitemana widget.
Readme
sitemana-widget-embed
Browser-ready public embed package for the Sitemana widget.
Usage
<sitemana-agent-widget agent-id="..."></sitemana-agent-widget>
<script src="https://unpkg.com/sitemana-widget-embed" async></script>The package is built with a canonical backend API origin baked in at build time.
Build
The Vite build auto-loads the repo root .env and .env.local, then falls back to the current shell environment.
Set one of the following in the repo root .env before building the package:
SITEMANA_WIDGET_API_BASENEXT_PUBLIC_API_URL
Example:
SITEMANA_WIDGET_API_BASE="http://localhost:4000"
NEXT_PUBLIC_API_URL="http://localhost:4000"Then run:
corepack pnpm --filter sitemana-widget-embed buildLocal testing
For local development, you can still override the demo script URL with the scriptUrl query parameter in examples/widget-embed/index.html.
