mix volt.install (Volt v0.19.4)

Copy Markdown View Source

Install and configure Volt in a Phoenix project

Replaces esbuild and tailwind with Volt — no Node.js required.

Example

mix igniter.install volt

This installer will:

  1. Remove :esbuild and :tailwind deps
  2. Remove config :esbuild and config :tailwind blocks
  3. Update assets.setup, assets.build, and assets.deploy aliases
  4. Add Volt build config to config/config.exs
  5. Add format and lint config to config/config.exs
  6. Add Volt.Formatter plugin to .formatter.exs
  7. Add Volt.DevServer plug to your endpoint
  8. Configure the automatic Volt watcher in config/dev.exs
  9. Wire Volt client types into TypeScript configuration

The installer checks tsconfig.json, assets/tsconfig.json, and assets/js/tsconfig.json. Ordinary JSON configurations retain their settings and receive explicit declaration files, even when dependencies are excluded. When none exists, the installer creates a root configuration from a template.

JSONC and configurations using extends or project references are left unchanged with guidance to include deps/volt/priv/types/client/**/*.d.ts (relative to the browser configuration). No local ImportMeta declaration is needed.