Skip to content

TypeScript API / @laikacms/vite-plugin / Namespace

Type Alias: Namespace ​

ts
type Namespace = "doc" | "store";

The laika: import protocol.

A source id looks like laika:<namespace>/<key>, where the namespace selects the repository the key is read from:

  • laika:doc/<key> → the documents repository (getDocument)
  • laika:store/<key> → the storage repository (getObject)

Resolved ids are prefixed with a NUL byte (\0) — the Rollup/Vite convention for virtual modules — so no other plugin tries to read them from disk.

Released under the MIT License.