I have noticed that when I use "mode: production" in webpack (essentially minifying the code), cors-anywhere breaks and returns gibberish in the responses:
The proxy code is:
import * as corsProxy from 'cors-anywhere';
const port = 8914;
const host = 'localhost';
corsProxy
.createServer({ })
.listen(port, host, () => {
console.log('Running CORS Anywhere on ' + host + ':' + port);
});
If I compile it with webpack build --config ./server.webpack.js with the following server.webpack.js, with mode: 'production' is just returns the gibberish above
That looks strange. I'm afraid that I don't have time to investigate this issue, and suggest to not use webpack for this lib and its dependency, or to not switch to production mode.
I have noticed that when I use "mode: production" in webpack (essentially minifying the code), cors-anywhere breaks and returns gibberish in the responses:
The proxy code is:
If I compile it with
webpack build --config ./server.webpack.js
with the following server.webpack.js, with mode: 'production' is just returns the gibberish above