Sprockets abandonment

A lot has been said already! I’ll add a few extra bits:

  • If webpack becomes the one and only solution at some point, people need to fully realise the incredible number of sub-dependencies this brings in (to fully grasp it, check out this visualisation). For apps with limited front-end needs, this increases the attack surface, some would say for little benefit. I wonder if Rollup (Visualization of npm dependencies) could be used more in those cases, as pointed out recently to me by @Ken_Collins1 (but if webpack is mandatory, I guess this will be complicated)
  • yarn is to be used, but upgrading an old Rails app to use it, I found it hard to figure out which version of yarn should be used (1 or 2). I ended up using settling on v1 for now after reading the edge guides section for Rails contributor, which specifies the v1 repository for Ubuntu (Installation | Yarn).

Both these points made upgrade from old apps a confusing/concerning experience (for a security-concerned industry).

Also, as many have said, I love the speed of Sprockets, still. Webpack integration makes reloading a page slower at this point.

9 Likes