It sounds like we are both more or less in agreement regarding what the key issues are but maybe have differing ideas regarding how to address them.
I think the other elephant in the room for me is that Rails already has a huge image problem no matter how undeserved that might be. However, this is precisely the kind of thing that I regularly see people point at under the category of “Rails is stuck in the past” kinds of complaints you see out there.
For the record, I mostly hate the JS ecosystem and think that hype-driven-development was one of the most unfortunate things to happen to web development precisely since the 2012 time period. But I think there is also a real fallacy in the idea that things like Webpack are only for people who are trying to build SPA’s for example.
I also hear what you’re saying regarding the general feeling of lack of stability regarding the JS ecosystem. I am also one of the many people who are basically terrified of trying to do anything but the most basic changes to a build configuration tool like that and that is to say nothing of the security nightmare of dependency hell that comes with the modern JS ecosystem.
Despite this having not a lot at all to do with Rails itself, I do agree that a new project with almost 20k dependencies out of the box is not something I want anything to do with whatsoever.
But it most certainly is possible to make that reasonable. Take for example this screenshot of the node_modules folder from Hey.
The question then becomes, why don’t we make this the default (assuming that is a reasonable goal).
I guess my question to you is if hypothetically Webpacker provided an abstraction on top of Webpack itself that “just worked” for all assets and gave you a whole bunch of best practices out of the box and most importantly did so in a way that assuming you didn’t want to “do anything crazy” you could know that you will never have to look at another Webpack or JS based configuration file again would you make the switch to ditching Sprockets?
That question is also very much open to @DHH, @georgeclaghorn or @samsaffron as well I guess considering they are also big sprockets advocates as far as I am aware (apologies if I am wrong).
Again, I don’t even know if what I am proposing is even a realistic goal or not so I might be talking nonsense here but as far as I can tell I don’t yet understand why it wouldn’t be.