Skip to content
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

Use Babel to compile to ES5. #159

Closed
wants to merge 1 commit into from

Conversation

@cdeutsch
Copy link
Contributor

commented Dec 20, 2018

Any interest in this or should I publish a query-string-es5 NPM?

Use Babel to compile to ES5.
Update tests to point to `dist` file.
@sindresorhus

This comment has been minimized.

Copy link
Owner

commented Dec 20, 2018

No interest

@cdeutsch

This comment has been minimized.

Copy link
Contributor Author

commented Dec 20, 2018

Why even spend the time to contribute your code if you're not willing to do the simplest things to support web developers 👎

Forking

@SamVerschueren

This comment has been minimized.

Copy link
Collaborator

commented Dec 21, 2018

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 babel-engine-plugin, which transpiles only the dependencies that needs to be transpiled.

@bj00rn bj00rn referenced this pull request Jan 11, 2019
@cdeutsch

This comment has been minimized.

Copy link
Contributor Author

commented Jan 16, 2019

This module mainly targets Node.js

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 const and it's a single file. It feels like an intentional middle finger to web developers.

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.
https://medium.com/@burger.neal/the-end-of-life-of-internet-explorer-11-12736f9ff75f

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 babel-engine-plugin, I'll look into that. 👍

I spent a whole day looking for solutions that are better than running the whole of node_modules through Babel and couldn't find any, and my team has been complaining ever since about slower builds.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.