When you run `compile` directly from the build script, there is not `app` to call `app.get('env')` on.

I am not happy about replicating this piece of code, but can't think of a better solution :(