A Dynamic extension is a regular npm package that exports one or more extension functions. The package should list @dynamic-labs-sdk/client as a peer dependency so consumers install a compatible version themselves.
Package structure
Use your own build pipeline (tsc, rollup, vite, tsdown, etc.). Do not bundle @dynamic-labs-sdk/client into the published package; keep it as a peer dependency to avoid duplicate SDK instances.
Publish
- Build the package with your toolchain.
- Run your test suite.
- Publish to npm with
npm publish (or your private registry).
Use the extension
Consumers install both the Dynamic SDK and your package:
Then import and call the extension after createDynamicClient:
If the package exports standalone functions, import them directly:
Version compatibility
Keep peerDependencies aligned with the Dynamic SDK major version. The extension APIs may change between major versions, so consumers should upgrade both packages together. Last modified on August 3, 2026