Description
I'm not sure if this is the right approach and maybe I've not understood this new part of the pipeline, yet, but:
Suppose, the major part of the app code lives inside a rails engine including all javascripts. And there are several main apps using that engine. The main apps only contain some layout changes and some minor patches.
Therefore, in order to integrate the webpacker gem into this setup, I'm trying to do the heavy lifting inside the engine, i.e. keep the work that has to be done inside all the main apps as little as possible.
How would I do that? Any pointers or suggestions are appreciated.
I'm not sure if this is a duplicate of #21. But in any case, I'd like to conclude this issue with a step-by-step guide how to approach this, for others facing the same use case.
What to do in the engine
- Include
webpacker
in the*.gemspec
file. require 'webpacker'
in thelib/foo/engine.rb
.- ...
What to do in each main app
bundle install
- Include
./bin/webpack-dev-server
in theProcfile
if using Foreman. - ...