ES6 - JavaScript Evolved

Chris is joined by Blake Williams for a discussion about ES6, the collection of proposed enhancements and updates to the JavaScript specification.


This is a companion discussion topic for the original entry at https://thoughtbot.com/upcase/videos/es6-javascript-evolved

@christoomey Hey! another great video. I’m really struggling to get es6 to work with rails. For some reason babel isn’t activating or maybe there is something I am just not understanding. Do you guys have an example rails 4.5 app with ES6 working?!

Unfortunately I’ve only used es6 via babel / webpack, and not via Rails. Hopefully another Upcase user can chime in?

I was able to figure it out!

Simply install

gem sprockets-es6 in your gemfile. Then start saving your javascript files as .es6 instead of .js and it will be transpiled for you by my good ole pal, the asset pipeline.