Replacing Brunch with Webpack 1 in Phoenix

A tale of build tools

I recently started with Phoenix and tried to get on board with the whole brunch thing, but that faded quickly enough.
I’m more back-end focused and don’t want to learn some obscure front-end thing I won’t use elsewhere. So, I decided to switch out brunch with webpack.

I’m using webpack 1 still, since it’s easier for me at the moment, but will switch to webpack 2 sometime in the future.
Unless of course The Next Big Thing TM for front-end comes out before then.

Steps

Like most things Phoenix, this was actually pretty easy to switch out. I’m going to show you my personal setup I use on my own projects. I am not claiming for this to be The One True Way or anything remotely close to that.

First, let’s add some npm dependencies to package.json. This is what I use: