skonves / express-http-context

Get and set request-scoped context anywhere
MIT License
299 stars 26 forks source link

Ships with ES6 code targeting browsers #48

Closed jacobdfriedmann closed 4 years ago

jacobdfriedmann commented 4 years ago

The browser.js file uses arrow functions, which are not supported on some older browsers. Since this code is targeting a browser runtime, it might make sense to ship ES5 compatible code instead. In order to not complicate the repos distribution, I'd advocate for just changing the source.

While this could be solved at the individual project level by allow-listing this module for compilation, I think most people who bundle code to target the browser assume the version shipped in node modules has been pre-compiled to a lowest-common-denominator.