You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This library is 🆒!!! I'm using it in one of my projects and I want to require it in my code, bundling everything with Browserify.
The fetch.js file doesn't module.exports anything currently. I would suggest to make it export the fetch function (even it's the native one or not).
Then we could do:
varfetch=require("whatwg-fetch")fetch(...)
Just an idea. I'm not sure if it's good to be implemented or not since the fetch function is anyway a global, but the code looks better and clearer this way than just require("whatwg-fetch") (without a variable name) in my file. 📝
Looking forward for your feedback. 😄
The text was updated successfully, but these errors were encountered:
IonicaBizau
changed the title
Using in commonjs environment
Using this library in commonjs environment
Nov 15, 2015
This library is 🆒!!! I'm using it in one of my projects and I want to
require
it in my code, bundling everything with Browserify.The
fetch.js
file doesn'tmodule.exports
anything currently. I would suggest to make it export thefetch
function (even it's the native one or not).Then we could do:
Just an idea. I'm not sure if it's good to be implemented or not since the
fetch
function is anyway a global, but the code looks better and clearer this way than justrequire("whatwg-fetch")
(without a variable name) in my file. 📝Looking forward for your feedback. 😄
The text was updated successfully, but these errors were encountered: