BEFORE
The template's StimulusJS installation relied on including --webpack=stimulus in the rails new call.
SOLUTION
Promote the StimulusJS installation to a first-class step in the template, which also allows properly encapsulating the StimulusJS-related config fixes we were already doing in an explicit step. It depends on --webpack in the rails new call still, but that is much more clear and resilient than specifically requiring --webpack=stimulus.
BEFORE The template's StimulusJS installation relied on including
--webpack=stimulus
in therails new
call.SOLUTION Promote the StimulusJS installation to a first-class step in the template, which also allows properly encapsulating the StimulusJS-related config fixes we were already doing in an explicit step. It depends on
--webpack
in therails new
call still, but that is much more clear and resilient than specifically requiring--webpack=stimulus
.