Vituum
raw JSON → 2.0.2 verified Mon Apr 27 auth: no javascript
Vituum is a fast static site generator and plugin for Vite that enables rapid prototyping with template engines (Nunjucks, Liquid, Handlebars, etc.). The current stable version is 2.0.2, released with a focus on stability and compatibility with Vite 5+. It is maintained actively with regular updates. Key differentiators include its minimalist core that leverages Vite's native features, straightforward configuration, and built-in support for multiple template engines without needing additional plugins. It is ideal for building static sites, email templates, and rapid prototypes directly within the Vite ecosystem.
Common errors
error Cannot find module 'vituum' ↓
cause Vituum not installed or missing from dependencies
fix
Run npm install vituum --save-dev
error ERR_REQUIRE_ESM ↓
cause Using require() to import an ESM-only package
fix
Use import instead of require, and ensure your project is ESM (type: module in package.json).
error TypeError: vituum is not a function ↓
cause Incorrect import: importing named export instead of default
fix
Use import vituum from 'vituum' (default import).
error Unknown engine 'ejs' ↓
cause Template engine not installed or not supported
fix
Install the engine (e.g., npm install ejs) and check spelling in config.
Warnings
breaking Vituum v2 requires Vite 5+ and Node.js >=20.19.0 or >=22.12.0 ↓
fix Update to Vite 5 and Node.js 20 LTS or newer.
breaking Default export changed from vituum to a function that returns an object in v2 ↓
fix Update import to default export: import vituum from 'vituum' (no named import of vituum).
deprecated The 'presets' option is deprecated in v2 in favor of direct plugin configuration ↓
fix Remove presets and configure plugins directly in Vite's plugins array.
gotcha Template engines must be installed separately; Vituum does not bundle them ↓
fix Install required engine, e.g., npm install nunjucks
gotcha Vituum's default export includes a 'name' property that may conflict with other plugins ↓
fix Ensure no other plugin uses the same name 'vituum' in the same project.
breaking Vituum v2 no longer supports CommonJS (require) ↓
fix Convert to ESM: use import statements and ensure package.json has type: module.
Install
npm install vituum yarn add vituum pnpm add vituum Imports
- vituum wrong
const vituum = require('vituum')correctimport vituum from 'vituum' - VituumOptions wrong
import { VituumOptions } from 'vituum'correctimport type { VituumOptions } from 'vituum' - defineConfig wrong
import defineConfig from 'vituum'correctimport { defineConfig } from 'vituum'
Quickstart
// Install: npm i vituum --save-dev
// vite.config.js
import vituum from 'vituum'
import { defineConfig } from 'vite'
export default defineConfig({
plugins: [
vituum({
// Optional: configure template engine, e.g., Nunjucks
// templates: { engine: 'nunjucks' }
})
]
})