@contentmap/vite
v1.0.1
Published
Vite plugin for contentmap. Covers Vite, SvelteKit, SolidStart, Qwik, React Router, TanStack Start and Analog.
Readme
@contentmap/vite
The Vite plugin for contentmap.
One plugin covers Vite, SvelteKit, SolidStart, Qwik, React Router, TanStack Start and Analog — they all build on Vite, so they all take the same integration.
Install
npm i @contentmap/viteUse
// vite.config.ts
import { defineConfig } from 'vite'
import contentmap from '@contentmap/vite'
export default defineConfig({
plugins: [contentmap()]
})Content builds before Vite resolves the first module, rebuilds on change in dev, and triggers HMR. The contentmap/generated alias is registered for you.
import { posts } from 'contentmap/generated'Options
Every BuilderOptions field is accepted — config, outDir, concurrency, onValidationError and the rest.
Note
This plugin is a convenience, not a requirement. It runs the same builder as the contentmap CLI and produces byte-identical output — a CI job diffs the two to keep that true. If you would rather run contentmap build yourself, nothing is lost.
Links
MIT
