Move serve generation into before_compile