Subbly.js SDK
Install Subbly.js
Subbly.js ships as an npm package and as a browser bundle. Pick one, then
start the SDK with Subbly.init.
Install from npm
Install the package
Import it with ES modules. This is the way to use Subbly.js with a modern JavaScript framework, such as React or Vue. The package ships its own TypeScript types.
Start the SDK
Subbly.init is the only supported entry point. It loads the shop before it
resolves, so subbly.shop is ready when you get the instance. Call it once per
page: the SDK keeps one shared HTTP client, and a second call with a different
key quietly reuses the first one.
Load from a CDN
The package also ships a browser bundle. Load it on your HTML page and it
defines the global Subbly. window.Subbly is the class, not an instance, so
you still call Subbly.init. Load it once per page.
Load the script
Next steps
- Configure — every option
Subbly.inittakes. - Keep it up to date — pin a version before you go to production.
Last modified on