-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[DOC] CDN version and browser variable #1269
Comments
I don't have any recommended CDN. Personally, I prefer bundling with webpack. When you use webpack it's also clear what is the name of the import and there aren't any globals to worry about. |
Does the library work without webpack, or is it an essential dependency? |
We provide |
That makes sense @pornel but when using the In retrospect there are actually 3 ways this could be resolved: mention that browser users have to add |
v5.0.0 was just released to NPM and an updated README is now available here on GitHub (see https://github.com/visionmedia/superagent#superagent). What's new
How to installnpm install superagent@latest
yarn add superagent@latest PolyfillsPlease see the Required Browser Features section in the README if you plan to support IE 9 and/or IE 10 and use |
unpkg
. Other comments have recommended usingwzrd.in
. Is there a "recommended" CDN? If so, it would be nice to mention somewhere in https://github.com/visionmedia/superagent#installation , with something likesuperagent
! To follow along with the examples in the README, I had to add the lineThere are two ways to fix the situation:
A) mention that the standalone script exports the
superagent
variable and recommend that browser users make the change in their codeB) rework the samples to use the
superagent
name instead (e.g.var superagent = require('superagent');
)I'd think
B
makes more sense given that there is an existing library calledrequest
The text was updated successfully, but these errors were encountered: