Install from npm
Both packages are published on npm as@cskn/sdk and @cskn/ui. Install them together with their peer dependencies:
@cskn/ui builds on @cskn/sdk, so install the SDK even if you only use the UI kit. If you only need the SDK, leave out @cskn/ui.
Peer dependencies
Your app provides these, so there is a single copy of each:Install from source
Until the first release on npm, the packages are consumed from source through a bundler and TypeScript alias.create-cskn-app sets this up for you; the steps below are for adding them to a project by hand. You still need the peer dependencies.
Vite alias
Point both package names at theirsrc folders, and dedupe the shared libraries so the app and the packages use one copy of each:
vite.config.ts
TypeScript paths
tsconfig.json
Asset base vs. router base
base: '/<slug>/' in Vite is where your assets are served from, and it is correct on every host. Where your router is mounted is not something the build can know: the same bundle is served at the root of <slug>.cskn.app and under /<slug> on a creator’s page. Pass appBasename() to your router instead of hard-coding it: