# `Volt.Pipeline`
[🔗](https://github.com/elixir-volt/volt/blob/v0.15.5/lib/volt/pipeline.ex#L1)

Compile source files to browser-ready JavaScript and CSS.

Dispatches to OXC for JS/TS/JSX/TSX and Vize for Vue SFCs and CSS, then runs
the shared JavaScript post-processing phase. Framework and plugin output flows
through the same post-processing as ordinary source files, so features such as
asset URL rewriting, dynamic import variables, `import.meta.glob()`,
`import.meta.env`, and worker/import specifier rewriting behave consistently.

# `compiled`

```elixir
@type compiled() :: Volt.Pipeline.Result.t()
```

# `rewrite_fn`

```elixir
@type rewrite_fn() :: (String.t() -&gt; {:rewrite, String.t()} | :keep)
```

# `compile`

```elixir
@spec compile(String.t(), String.t(), keyword()) ::
  {:ok, compiled()} | {:error, term()}
```

Compile a source file to browser-ready output.

## Options

  * `:target` — downlevel target (e.g. `:es2020`)
  * `:import_source` — JSX import source (e.g. `"vue"`)
  * `:sourcemap` — generate source maps (default: `true`)
  * `:minify` — minify output (default: `false`)
  * `:vapor` — use Vue Vapor mode (default: `false`)
  * `:rewrite_import` — function `(specifier -> {:rewrite, new} | :keep)` for import rewriting
  * `:plugins` — list of `Volt.Plugin` modules to run
  * `:define` — compile-time replacements for `import.meta.env`

---

*Consult [api-reference.md](api-reference.md) for complete listing*
