Hacker News new | ask | show | jobs
by davej 3481 days ago
I think the main issue with the transition of Babel 5 -> Babel 6 was a cognitive one. A few CLI one-liners don't really address this. Babel was zero-config and now it's not. I now need to understand what presets and plugins do and how to order them to get desired results when transpiling.

Ultimately, it was inevitable and I think it was a very good thing! I'm really happy that Babel 6 exists. But figuring out your Babel presets and plugins is undoubtedly another thing that we have to think about when we start a project. Similarly with JSLint/JSHint -> ESlint.

Thank you for your great work, I use Babel daily and Flow sometimes (less often than I should).

2 comments

Anything more than the two presets "es2015" and "react" (we never should have shipped "react" on by default, we just didn't have a pluggable parser before) required configuration in Babel 5. A regular complaint that we had was that the Babel <5 configuration was really annoying because it involved three separate whitelists/blacklists
> But figuring out your Babel presets and plugins is undoubtedly another thing that we have to think about when we start a project. Similarly with JSLint/JSHint -> ESlint.

There's ways around this. Tools people built to make this easier.

I created a preset of my own for Babel, and now I use that for any new project, no figuring it out every time. I know what my preset has in it, and if I need anything new, I can put it in and all other projects have it now too.

Same with ESLint, there's tools such as Standard (And the standard-engine if you don't want to use actually standard) where it IS drop in again.