Closed lnfnunes closed 6 years ago
I can't reproduce this really. I tried putting it on and off and in both cases, middleware.unshift
is not working.
@lnfnunes try the following:
middleware: function (connect, options, middlewares) { middlewares.unshift(require('grunt-middleware-proxy/lib/Utils').getProxyMiddleware(), compression(), require('connect-livereload')()) return middlewares; }
If you are not using a proxy, you can get rid of the "grunt-middleware-proxy" middleware.
Thanks in advance! Unfornutly, nowadays I don't have this scenario anymore so I can't confirm if this works or not. Thanks for you reply @chhaymenghong!
I'm using compression package for gzip my responses. It works fine if livereload options is "false". When I turn it on the middleware stops working and the browser has blank responses from server (no page). Bellow is my middleware configuration: