Skip to content

Commit

Permalink
fix: turn off bufferify in the nets module
Browse files Browse the repository at this point in the history
  • Loading branch information
kahlil authored and gr2m committed Jun 12, 2017
1 parent b9fa7a3 commit 2ab7b99
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/utils/request.js
Expand Up @@ -11,7 +11,12 @@ function request (options) {
requestState = internals.nets({
method: options.method,
url: options.url,
timeout: options.timeout
timeout: options.timeout,
// Turn off the use of Buffer in nets
// in order to make this module compatible
// for Webpack builds.
// see: https://github.com/maxogden/nets
encoding: undefined
}, function (error, response, body) {
if (error) {
error.name = error.code === 'ETIMEDOUT' ? 'TimeoutError' : 'ConnectionError'
Expand Down

0 comments on commit 2ab7b99

Please sign in to comment.