Asset pipelines: just say no
This title could be clearer and more informative.Try out Clickbait Shieldfor free (5 uses left this month).
A Rails developer argues against using asset pipelines (Sprockets, propshaft, importmaps, Bun, webpack, etc.) for most web apps. The only real justification for asset fingerprinting is preventing mismatched assets during blue/green deployments — but this requires serving assets from a CDN anyway. Instead, the author proposes serving plain JS modules directly from the Rails app, using on-the-fly regex rewrites to append version query strings for cache busting, and scanning JS files at runtime to generate modulepreload link tags. The post advocates writing vanilla HTML, CSS, and JS with Stimulus controllers and web components, avoiding framework churn. It also warns against Bun due to its dropped support for older Intel Macs without AVX2, recommending esbuild instead.
Table of contents
How useful is an asset pipeline?Why propshaft/importmaps is not “it”What could we not do?A note on stale assetsSolving the waterfallSolving the cache bustingBack to other pointsSo what do we write?RecapSort: