> This means when you install Babel it will no longer transpile your ES2015 code by default.
what I really see is "This means that Babel no longer works out of the box and is now harder to use."
Was any thought given to how much additional complexity this adds to what was previously (https://babeljs.io/docs/setup/#babel_cli) a very simple way to get started?
I've posted two comments discussing default behavior. Too many ("over and over")? And I can see several others raising the same issue in this very thread -- all wrong to focus on that issue?
My main concern was raised in the longer thread with you. It is negative because I don't see this as a positive move. Nobody explained why changing the default behavior is a good move (even if it's easy to add back), or what it has to do with a desire for modular internals (since those don't preclude that).
In any case, Babel has been a valuable tool and I really hope this direction comes out for the best.
Regarding the very slow babel 6.0.2 timings - something odd is going on. I removed the babel 6.0.2 install, installed node 5.0.0 which ships with npm 3.3.6, ran the install commands at the top of this thread and the babel 6.0.2 speed reached parity with babel 5.8 - both babel versions ran at around 0.55s.
(edit) Then I leave the babel 6.0.2 install as is and then run it against a node 4.2.1 binary - the babel 6.0.2 speed is once again 0.55s - no difference.
So I removed both the node 5.0.0 and babel 6.0.2 installs, re-installed node 4.2.1 with npm 2.14.7 and ran the following commands:
So the babel 6.0.2 speed difference is not due the node version, but may have something to do with the different npm versions and how they install node_modules, or the fact that I installed the modules one at a time.
So I've isolated the problem - babel 6.0.2 installed with npm 2.14.7 is slow, and when installed with npm 3.3.6 is fast. OS and node version is not a factor.
Likely a separate tool using Babel modules. Flow is more likely at this point. TypeScript syntax might be in the future too. There hasn't been a whole lot of desire for it yet.
Do you foresee {webpack, browserify} eventually being replaced by a Babel plugin? Dan is doing HMR in Babel now with babel-transform, which makes me think it's not that far out-of-bounds.
First I thought after ES6 is landed in all browsers Babel would be unnecessary in near future but now that ES guys decided to release a new version each year it seems that we're going to see Babel around for a long time!
If you look at which ES6 features are actually supported by the major browsers (https://kangax.github.io/compat-table/es6/) it doesn't look like you can drop Babel any time soon.
Some features are pretty well supported in the major desktop browsers, but if you also include mobile browsers it doesn't look that good.
It's just hard knowing which browsers will support something and when. It's be nice to have a browser target config nicely built in to babel. Like, I want to support any major browser version after Aug. 2015. If something is supported in all of the browsers, drop the transpiler for it.
I have been wondering about this a lot. It feels like about a year since writing then transpiling ES6 became a fairly mainstream approach, and we're nowhere near having full ES6 support in enough (or actually any, for now at least) browsers with a high proportion of usage.
This is manageable because you can just reason "well, I'll transpile everything to ES5" and be done with it. But what happens when most browsers do support ES6, but not ES7, or ES8 - what about when people don't update browsers, etc. I am really worried about this becoming such a nightmare that the default will always to be to transpile everything to an older version (probably 5 or 6) for the next 2-3 years just for safety, even when some browsers do support new versions coming out.
Can anyone point me to any resources which address and discuss this issue? Your idea about specific browser version targeting in the transpiler is a great one, and one I'd not even considered before, thanks.
Well I haven't contributed anything to babel, but if I get some free time (it's rare), I might see if I can figure something out and make a thread to discuss it. I'm sure they have thought about it already...
Even if you can list a version number for each of the major browsers you need to support, that'd be awesome.
We actually tell all of our clients using our Web app to update to the latest browser when possible. Hopefully the days of companies not upgrading their browsers are almost behind us... But I'm sure many will be stuck supporting Safari 8 for example, which has very little es6 support, for a while. I know of some large corporations who can't upgrade to IOS 9 and thus Safari 9 because of ivp6 issues...
Hmm, it was closed because it was considered 'out of scope'. Who does the testing on every browser/device combination seems to be the big question. Seems like something Babel should set up internally as it's their tool and thus people will need to trust when they say "on these devices and these browser versions, block scoping 'let' works." Rather than a 3rd party just saying, yeah it works...
Babel has been indispensable for us in the last year and looks to only be getting better. Congrats on the new version and I look forward to being able to transpile all the things!
Given that transpiling (one of the main features of Babel) seems to be increasingly popular, whatever happened to asm.js? Naively, it seems like targeting a highly optimizable subset of JS would be a smart idea if transpiling is being used anyways. Seems like I don't hear about asm.js much anymore.
When I targeted asm.js, the result wasn't much faster than plain js. Also, asm.js recently made it into Node, but Node doesn't tell you when your asm.js code is valid or not. And when it's invalid, it doesn't produce any errors.
>Babel has spent the last year finding its place in the JavaScript community. In February we decided that Babel wasn’t just going to be a ES6 transpiler. Instead, it needed to become a platform. A suite of tools designed to create the next generation of JavaScript tooling.
Hmm, while this might work out for Babel, this is exactly how projects lose focus and falter.
The Eclipse IDE is a prime example of this BS -- there are tons of others.
> This means when you install Babel it will no longer transpile your ES2015 code by default.
what I really see is "This means that Babel no longer works out of the box and is now harder to use."
Was any thought given to how much additional complexity this adds to what was previously (https://babeljs.io/docs/setup/#babel_cli) a very simple way to get started?