---
title: "Vue references"
description: "Vite + Vue with createContentClient and the references client plugin."
canonical_url: "https://content.comark.dev/examples/vite/vue-references"
---
# Vue references

> Vite + Vue with createContentClient and the references client plugin.

::code-explorer
```yaml [props]
org: comarkdown
repo: comark-content
path: examples/vite/vue-references
defaultValue: src/App.vue
```
::

The build-time instances in `vite.config.ts` use [`references()`](https://content.comark.dev/plugins/built-in/references) and are composed into a [hub](https://content.comark.dev/advanced/hub); the browser uses [`createContentClient`](https://content.comark.dev/reference/client/create-content-client) with `comark-content/plugins/references/client`. Toggle **populate** to compare stored path strings vs inlined documents.

Posts reference documents two ways: `author` points at the `authors` instance, and `relatedPosts` is a self-reference array pointing back at `posts`.

Two references are intentionally broken to show that resolution never throws: a missing `relatedPosts` entry is dropped from the array, while a missing `author` becomes `null`.


## Sitemap

See the full [sitemap](https://content.comark.dev/sitemap.md) for all pages.
