Skip to content

TypeScript API / @contentia/vite-plugin / Namespace

Type Alias: Namespace ​

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

The contentia: import protocol.

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

  • contentia:doc/<key> → the documents repository (getDocument)
  • contentia: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.