@todayai-labs/tck-shared-deps
Build tool that emits the host's importmap-served externals — react-runtime.mjs, tck.mjs, tck-host.mjs.
A build-time tool. Produces the shared-deps directory the host serves to widgets via an import map. Output is a small set of single-file ESM bundles (react-runtime.mjs, tck.mjs, tck-host.mjs) plus a manifest.json mapping bare specifiers to URLs.
Not to be confused with tck-bundle-format — tck-bundle-format defines the .tckb wire format (bytes). tck-shared-deps produces the JS module artifacts that the host import-map resolves for widgets' import "react" calls. Opposite ends of the stack.
tck-shared-deps is not in the SDK fixed-release group. It versions independently because host apps depend on it via their own devDependencies; widgets never see it.
CLI
tck-shared-deps \
--out apps/web/public/__tck/v1 \
--abi v1 \
--url-prefix /__tck/v1--out— where to write the bundle files. Wiped and recreated each build (hermetic output).--abi— informational only; defaults tov1. Appears in build logs and the result echo. Encode the actual ABI label via--out+--url-prefix.--url-prefix— the path prefix the host will serve the output under. Determines what the emittedmanifest.jsonURLs look like.
Programmatic surface
| Export | What it does |
|---|---|
buildPlatform(options) | Programmatic build. Returns the manifest + per-group results. |
defineConfig(config) | Type-safe config helper for tck-shared-deps.config.ts. |
DEFAULT_GROUPS | The default group definitions: react-runtime.mjs, tck.mjs, tck-host.mjs. |
buildManifest, normalizeUrlPrefix, writeManifest | Manifest-shape helpers (specifier → URL). |
Singleton invariant
Each npm package gets exactly one physical output bundle. react and react/jsx-runtime map to the same react-runtime.mjs; the bundle re-exports the union of names. Splitting a single package across two URLs would duplicate React fiber state and break hooks crossing the host/widget boundary.
Source
- Package:
packages/tck-shared-deps - Default groups:
packages/tck-shared-deps/src/groups.ts - Host shared-deps section: Platform ABI § Host shared-deps bundle.
@todayai-labs/tck-host-native
Bundle-artifact package for non-Vite native hosts (macOS / iOS / iPadOS / visionOS). Ships dist/ with harness.html + importmap-resolved shared deps for WebView consumers.
@todayai-labs/tck-bundler
Compile a .tck.tsx widget source into a distributable .tckb bundle. CLI + programmatic.