Skip to content

Superagent for Webpack

Petr Bela edited this page Mar 2, 2015 · 4 revisions

If you have trouble compiling superagent with Webpack (e.g. it says it requires fs), you can either use superagent's browser version directly (require('superagent/lib/client')), or fix your Webpack settings:

Add:

plugins.push(new webpack.DefinePlugin({ "global.GENTLY": false }));

and

node: {
  __dirname: true,
}

to webpack's config.

Clone this wiki locally