A Vite plugin that transforms .norg files (Neorg document format) into renderable HTML, React, Svelte, Vue components or metadata. Current stable version is 4.0.11, released weekly. Key differentiator: it bridges the Neorg note-taking ecosystem with modern web frameworks, providing source maps, code syntax highlighting via arborium/tree-sitter, embed components, and full TypeScript type definitions. Supports multiple output modes (html, react, svelte, vue, metadata) with automatic framework detection. Requires Vite 8+, and React/Svelte/Vue peer deps only when using those modes. Compared to generic markdown-to-JSX tools, it is purpose-built for Norg files and leverages Neorg's native parser (WASM/Napi/Rust) for accuracy.
npm install vite-plugin-norgVerified import paths — ran on the pinned version, not inferred.
Configures Vite with the norg plugin in React mode and demonstrates importing a .norg file as a React component with metadata.
Update Vite to ^8.0.0.
Use import { norgPlugin } from 'vite-plugin-norg'.Upgrade to Vite 8.
Set mode to the same framework as your frontend code.
Avoid reserved words as metadata keys.
Use import { metadata, toc } from './doc.norg?metadata'.Run npm install -D vite-plugin-norg.
Change to import { norgPlugin } from 'vite-plugin-norg'.Ensure norgPlugin mode matches the framework (e.g., 'react' for React).