So as many of you might now, Rails have been adopted officially Webpack for Rails 5.1 (with the –webpack option) through the Webpacker gem, most of the decisions in the integration were based in the exploration work made by DHH and me separately, being the most important difference that DHH kept Sprockets for CSS/images/fonts/etc.
Some of the things we changed since my last post about Webpack are:
Yarn is now a default in Rails 5.1 apps!!
Files processed by Webpacker live under
CSS/Sass/fonts/images still supported through Sprockets and can be used by Webpacker through ERB.
We have added support for ES2015+ (2015/2016/2017) through Babel.
The ERB Loader is included by default.
Webpack (in watcher mode) should be run as a separated process.
Ping me on Twitter if your applications are already using Webpacker or if you have any feedback about it.