Phoenix Webpack Generator

Inelegantly replace Brunch with Webpack. This generator will forcefully remove Brunch as your asset build tool and replace it with a simple Webpack setup.

I do not recommend using this on an existing project. In such a scenario, do check out this super easy to follow tutorial by Manuel Kallenbach.

Installation

Create a new Phoenix project and add this to your mix.exs dependencies:

defp deps do
  [{:phoenix, "~> 0.14"},
   {:phoenix_ecto, "~> 0.5"},
   {:postgrex, ">= 0.0.0"},
   {:phoenix_html, "~> 1.1"},
   {:phoenix_live_reload, "~> 0.4", only: :dev},
   {:cowboy, "~> 1.0"},
   {:phoenix_gen_webpack, "~> 0.1.0", only: :dev}]
end

Now run mix deps.get and mix phoenix.gen.webpack.