Webpack in the Rails Asset Pipeline
This snippet of code integrates Webpack into the Sprockets build process
At Brigade, we wanted to integrate the Webpack module bundler to combine our CommonJS modules.
However, we also wanted to keep the Sprockets as the last step in our build
pipeline for the easy integration with Rails via the
We ended up creating a prerequisite step in the asset precompilation process by using a bit of Rake trickery. It has been working pretty well for us, and perhaps you will find it useful: