Hacker News new | ask | show | jobs
by bezzi 3481 days ago
Now they just need to replace coffeescript with es6/babel.
2 comments

`--webpack` and `--yarn` are both coming, so they definitely seem to be headed that way.

[1]: https://github.com/rails/webpacker [2]: https://github.com/rails/rails/pull/26836#issuecomment-26424...

I'm not a fan of CoffeeScript but do they really need to lug the huge amount of dependencies babel brings along with it? Why not target ES5 with some ES2015 sprinkles in depending on compatibility and slowly work towards ES6?
I'm not sure how you slowly 'work towards' ES6. Unless you decide to only support bleeding edge browsers, you cannot use ES6 or ES7 features in production applications.

The only way we can use them is through transpiling. This will be the case for at least another three or four years.

> I'm not sure how you slowly 'work towards' ES6. Unless you decide to only support bleeding edge browsers, you cannot use ES6 or ES7 features in production applications.

Not really.

First it depends on your target audience. How new are their web browsers? Where are you developing your web applications? Some projects I've worked on have web applications that run in only a single environment so those are easy. Others I've had highly technical websites that the vast, vast majority went to using newer web browsers.

Second, pick and choose your ES2015 features. Honestly you don't need ES2015 at all but if you want to use it then some items, like let and const, are supported all over the place but others, like fat arrows, not as much.

> The only way we can use them is through transpiling. This will be the case for at least another three or four years.

Again all depends on your target audience. Maybe? Then again I've never been the biggest fan of transpiling one language into another just to access a couple of minor feature additions. It's a huge amount of dependencies, build time, etc all to support a few minor things.

You can absolutely use some of ES6, but only the library parts, which by and large aren't that interesting.