Skip to content

Add optional Volt support to phx.new#6679

Open
dannote wants to merge 1 commit into
phoenixframework:mainfrom
elixir-volt:volt-phx-new
Open

Add optional Volt support to phx.new#6679
dannote wants to merge 1 commit into
phoenixframework:mainfrom
elixir-volt:volt-phx-new

Conversation

@dannote
Copy link
Copy Markdown

@dannote dannote commented May 16, 2026

Adds an opt-in --volt flag to mix phx.new that generates projects using Volt instead of the esbuild and tailwind wrappers.

Volt is an Elixir-native asset pipeline — bundles JavaScript, runs Tailwind CSS, and serves assets in dev with HMR, all through NIFs. No Node.js required.

What changes

  • --volt flag for mix phx.new, mix phx.new.web, and the interactive installer
  • Generates {:volt, "~> 0.11.0"} with matching config, dev watcher, endpoint plug, layout, formatter, and asset aliases
  • Works for single-app, umbrella, and multi-web umbrella projects
  • Umbrella projects use named Volt config profiles (config :volt, :my_app_web, [...]), matching the esbuild/tailwind convention
  • Rejects conflicting flags (--volt --no-esbuild, --volt --no-tailwind)
  • Default output unchanged — Volt is only used when explicitly requested

@dannote dannote marked this pull request as ready for review May 16, 2026 12:51
@SteffenDE
Copy link
Copy Markdown
Contributor

I don’t think we should add any more options to the generators and rather explore such integrations using igniter. I believe you should be able to use igniter.new to bootstrap a phoenix project and then apply the changes on top.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants