Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Use Babel to compile to ES5. #159
This module mainly targets Node.js, not the browser. It's up to you to transpile it with Babel if you want to use it in the browser. You can find a more detailed explanation here: sindresorhus/ama#446
If you use Webpack, check out
How so? There is nothing specific to Node about this code. Don't you think browsers need to deal with query strings? Not to mention it's barely even using ES6. Just arrow functions and
I've read @sindresorhus opinion on the matter of jumping to ES6. Unfortunately for web developers Microsoft bundled IE11 with Windows 10, so we're stuck supporting an ES5 only browser until 2025.
I get he doesn't have any empathy for web developers because he doesn't do browser development, but this decision has come back to bite me and many other developers in the ass, and wasted countless hours of people's time. (I alone lost 2 or 3 days)
The NPM ecosystem and frontend build systems weren't ready for this change, when he started shipping ES6 packages. Would have been nice to have giant warnings about not using it on the web at the top of the README, instead of marketing affiliate links.
Thanks for the link to
I spent a whole day looking for solutions that are better than running the whole of