For the longest time, I lived in a terrific awe at the magic of the build step. Parsing, compiling, transpiling, and everything else that goes into the process of bundling web stuff was an arcane ritual that I crossed my fingers, closed my eyes, and hoped to never see a failure from. As a result, I have never written a build script, nor configured Webpack.
When I finally opened my eyes to the truth of how these things work (spoiler: it’s just moving strings around from one set of files to another), the fear abated. But I still held on to a sense of “purity” — I would get by with as little fiddling as possible.
But this week, I wanted my site to use a Service Worker to provide an instant navigation experience across pages, even in the absence of a network connection. As per first instinct, I went looking for the Hugo-blessed way to do this and…didn’t find one. It turns out, I’d need a post-build script. The horror! (if I was still a coward)
But I’m not anymore, and I have the LLMs to write the script and Makefile so I don’t need to learn the syntax. Nor do I have to live with a sense of “dear Netlify, please build my site from my Git push, thank you so much”, because I can build the site on my own machine and upload directly. As a bonus, it’s around 50% faster than the old Git commit → Github → Netlify → CDN workflow I had earlier.
If you feel like commenting on this post, send me an e-mail at judah@joodaloop.com. I check all mail and respond within 2 days.