DEV Community

Discussion on: Understanding the Asset Pipeline in Ruby on Rails

Collapse
 
justalever profile image
Andy Leverenz

Definitely will in the future. In short, Webpack is independent of the asset pipeline. Rails 6 will ship with the webpack support by default. That creates a new javascript directory in the main app folder. There you can wrangle any modern JavaScript.

At the moment the Rails team suggests authoring JavaScript inside the javascript/packs directory and leaving CSS and images/assets for the asset pipeline to deal with.

I'll have walkthrough of this soon

Collapse
 
tadman profile image
Scott Tadman

Disabling Ruby's asset pipeline and swapping in Webpacker as the exclusive method of packing assets is annoying, but often necessary. Even DHH has admitted that ye-olde asset pipeline is coming to an end soon and that Webpacker is the future.

I've appreciated what the asset pipeline has done for me in the past, but it just isn't as configurable as things like Webpack.

A walkthrough for Rails 6 would be a great resource to have.

Thread Thread
 
alexvirtualbr profile image
Alexandre Ferreira

Yes Scott, in this moment I'm use pipeline in my current project only to images and stylesheets. For javascript I'm using webpack yet. I'm thinking a bit slowly to compile the assets but it's my first tests...