From 219552ed200cee5a15d0e9fd0c28b36a39d428c2 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 22 May 2026 01:12:52 +0000 Subject: [PATCH] Document UMD bundle usage via jsDelivr and unpkg Add a CDN section to the plugin-sdk README covering how to load the UMD build from jsDelivr or unpkg, the `SigmaPlugin` global, version pinning, and how to load React first when using the React API. --- packages/plugin-sdk/README.md | 61 +++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) diff --git a/packages/plugin-sdk/README.md b/packages/plugin-sdk/README.md index efd2182..7b0a0d2 100644 --- a/packages/plugin-sdk/README.md +++ b/packages/plugin-sdk/README.md @@ -54,6 +54,67 @@ yarn add @sigmacomputing/plugin npm install @sigmacomputing/plugin ``` +#### Using the UMD bundle from a CDN + +If you are not using a bundler, you can load `@sigmacomputing/plugin` directly +from a CDN such as [jsDelivr](https://www.jsdelivr.com/) or +[unpkg](https://unpkg.com/). The package ships a pre-built, minified UMD bundle +that exposes its exports on the `SigmaPlugin` global. + +```html + + + + + +``` + +We recommend pinning to a specific version in production so updates don't +silently change behavior: + +```html + + + + + +``` + +Once the script is loaded, the SDK is available as `window.SigmaPlugin`: + +```html + +``` + +React is treated as an external dependency in the UMD bundle. If you want to +use the React API (`SigmaClientProvider`, `usePlugin`, etc.) from the CDN +build, load React first so the global `React` is available before the SDK +script runs: + +```html + + + +``` + If you have yet to set up your development environment, follow one of the setup guides below