Befor ditching browserify for webpack, do check out <a href="https:&#x2F;&#x2F;github.com&#x2F;ForbesLindesay&#x2F;browserify-middleware" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;ForbesLindesay&#x2F;browserify-middleware</a> gets the job done just fine