Assets
Current status
WebPack is used for all new development regarding frontend (JavaScript, CSS, and images). The goal is to migrate all the legacy assets code to WebPack.
WebPack
Today, WebPack will generate a bundle from various files. WebPack will move the bundle to app/assets
and then Rails will serve it with the asset pipelines. The bundles are located in:
app/assets/javascripts/bundle
app/assets/stylesheets/bundle
app/assets/images/bundle
The WebPack source code is in web_app/
Asset Pipeline
Even if the Rails Asset Pipeline is used, it should be ignore for all development. Be careful if you introduce a gem that needs assets. Extract the assets and communicate with the frontend team to include them in WebPack instead.
Migration
The process of migrating assets to WebPack is not complete. This is done in parallel with the introduction of ReactJS and Redux for the frontend. The end goal is to have a Single Page Application using API from the backend and ReactJS component on the front to decouple backend and frontend completely.
Communication with the frontend team
It's easier for a backend developer to touch assets or views. The communication with the frontend team is crucial to avoid bad architecture regarding assets management.