To be able to experiment and try this gem with Rails stable I propose to include in it the yarn binary template (currently only available on rails master).
The yarn binary template is also called by the installer here: https://github.com/rails/webpacker/blob/master/lib/install/template.rb#L16
Do you agree?
Yeah, I'm OK with that duplication for now. At first the goal was just to target 5.1, but seems like we don't need any concessions from 5.1 yet to require that. So let's just make it compatible with 5.0 until that happens.
Note: That is no guarantee that we won't need things from Rails in Webpacker that only 5.1 can provide, and then we'll drop these compatibility bits.
I agree. What I've seen on twitter is that a lot of people including me wants to experiment this gem on existing rails 5 apps. I've added a warning in the README file about the fact that there's no warranty on the compatibility with Rails stable.
Most helpful comment
Yeah, I'm OK with that duplication for now. At first the goal was just to target 5.1, but seems like we don't need any concessions from 5.1 yet to require that. So let's just make it compatible with 5.0 until that happens.
Note: That is no guarantee that we won't need things from Rails in Webpacker that only 5.1 can provide, and then we'll drop these compatibility bits.