Webpacker and "config" file organization

Rails would benefit from a canonical more logical locating of folders and files in Webpacker. I followed several articles and not knowing what I was doing, now have this, some of which needs to be refactored, but it works and I spent enough time on in.


.scss in a javascript folder? Differences in the three JS file locations?

Secondly is having package.json and other .json at the top level. I guess one could ask why Gemfile is top level and routes is not.


Thanks for this feedback!

There’s a coordinated effort going on to improve the documentation around this. You can look for updates here:

JavaScript Documentation Coordination

Second this one in particular. The default app directory gives me a pretty good starting point for me to organise most of my Rails code. app/javascript feels like an intimidating blank slate.

Sprockets had its drawbacks, but the structure it provided felt pretty intuitive and Rails-y