API Reference Volt v#0.10.2

Copy Markdown View Source

Modules

Elixir-native frontend build tool.

Static asset handling — images, fonts, SVGs, and other non-code files.

Production build — resolve dependencies, split chunks, bundle, and write assets.

Extract code and sourcemap from OXC bundle results.

Walks the dependency graph from entry files, collecting modules and workers.

Rewrite external imports into global variable access for production builds.

Resolve import specifiers to absolute file paths for the build graph.

CSS Modules support for .module.css files.

ETS-backed module cache keyed by {path, mtime}.

Build a chunk graph from module dependencies.

Read Volt configuration from application environment.

ETS-backed module dependency graph.

Plug that serves compiled frontend assets in development.

Load environment variables for client-side code.

A mix format plugin that formats JavaScript and TypeScript files with oxfmt.

Detect HMR boundaries by scanning for import.meta.hot.accept() calls.

Serves the HMR client JavaScript, compiled from TypeScript.

WebSocket handler for HMR updates.

Extract entry points from HTML files.

Transform import.meta.glob() calls into static import maps.

Rewrite import specifiers in compiled JS output using AST positions.

Import specifier resolution with alias support.

Runs JavaScript build tools through QuickBEAM with package dependencies isolated from the user's application.

Error returned when a JavaScript runtime cannot be prepared or started.

Read compilerOptions.paths from tsconfig.json and convert to Volt aliases.

Pre-bundle vendor (node_modules) dependencies for dev mode.

Compile source files to browser-ready JavaScript and CSS.

Behaviour for Volt build plugins.

Built-in React prebundle coordination for Volt dev mode.

Built-in Svelte support for Volt.

Execute Volt plugin hooks.

Generate <link rel="modulepreload"> tags for production chunks.

Tailwind CSS integration — scan source files for candidates and compile CSS.

Handles Tailwind module loading, prebundling CJS graphs via OXC, and stylesheet resolution.

Resolves stylesheet and module paths for the Tailwind runtime.

File watcher that triggers recompilation, Tailwind rebuilds, and HMR updates.

Mix Tasks

Build production frontend assets.

Start the Volt file watcher for development.

Install and configure Volt in a Phoenix project

Check formatting and lint Volt's JavaScript and TypeScript assets via NIF.

Format Volt's JavaScript and TypeScript assets with oxfmt via NIF.

Lint project JavaScript and TypeScript assets using oxlint via NIF.