Hacker News new | ask | show | jobs
by dchest 3693 days ago
"Bublé is so funny. Remember Babel started out as "Traceur output is too complex!" Over time they learned that being spec-compliant matters." — Domenic Denicola (@dominic, Editor of the @htmlstandard and @streamstandard. Works on @googlechrome.)
2 comments

(Continued) "Now the cycle begins anew, with a "lightweight" ES transpiler that generates output with oversimplified, wrong semantics."
That seems like a biased description. Being lightweight doesn't seem to be a goal. The goal is having a very clear function with no configuration, and being simpler is just for brownie points.
Wait, so JSX is part of the ES spec? Oh, it's not.

I really wish people called it BabelScript. It's annoying to constantly have to fight the (incorrect) assumption that "it works in Babel" === it's ES.

Babel 6 doesn't support JSX (or really, anything) by default; you need a plugin. The es2015 preset is what's in ES2015.
Then it's worthless to say "Babel is spec compliant" when it is just compiler infrastructure and not a compiler. It can be as spec compliant (or not) as you want.
babel-preset-es2015 is as canonical a "default configuration" as you're likely to find.
Does it enforce you putting `.js` on import strings? It should.
Why would it.. babel doesn't do any actual import/export modification. It doesn't have a module/bundler built in... that's what webpack, browserify and the like are for.. and no, they don't require the .js, but you can still use it.