Asset pipelines: just say no
My good mate Yaroslav wrote about his new solution for bundling a complete Bun runtime inside a gem - by all means, give it a read. A lot of points he makes are very sensible, but for a few months now I have decided that - for myself - I will not be using any frontend bundling nor JS runtime at all. Here’s how you can do the same. How useful is an asset pipeline? There is, in fact, just one sensible use case for needing an asset pipeline, and it goes as follows. You are running revision abc0 on two machines, box1 and box2 You make some glorious changes to your frontend code, and a new version gets prepared which requires those changes to be applied to the frontend assets your users get loaded You deploy revision def1 with those changes. Then, because you sensibly deploy blue/green, the following happens: box1 gets the new version deployed, and a user hits it and loads the root page. The root page includes a reference to scripts.js, which is served from the same application. The browser shoots out a request for scripts.js as soon as it sees it while HTML is coming down on the wire The request for scripts.js ends up not on box1, but on box2. That box is still running your older version - the user gets their assets loaded for the older application revision, and gets a broken experience.