Vendoring

Here's a fun thing I've done on a recent side project: vendoring my JavaScript dependencies. When I needed a JavaScript library, I just copied some dist files and checked them into my application. Fuggedaboudit.

A disclaimer: this is not an application-logic heavy web application. It's a website. It uses Swup for page transitions, and it uses Swiper for a carousel or two, and it uses a handful of handrolled JS classes for stuff like simple image lightboxes and video players with custom controls. It's a website. It has some Content, and you click around and read the Content and look at the nice pictures. I'm not building Gmail, here.

But it doesn't even have a build step! Have you tried Vite? Have you tried shipping the same JavaScript that you write directly to your users? What do they say about, the only way to guarantee bug free builds is not to build at all?

Anyway, because I don't have a build step, and because I've recently developed a nearly fatal allergy to package- and dependency management, I've elected to use Hugo for generating the site (so single binary, much simple, wow) and a vendor/ directory where I stash a bunch of .min.jsfiles I downloaded from unpkg.

No vite build, no npm install. My build times are instant. The gremlins that power Netlify's build pipeline scuttle hither & to, trying to keep up. I am acutely aware of exactly how much JS I'm asking users to download and run. This has radicalised me against modern website build culture more than 100 "sustainable web development" blog posts ever could.

Web

Next

Google the search engine

Google Search has been having a Rough Time of it lately, but don’t feel bad: it’s their own fault.

Previous

Web devs: not great

Remember when I said the web is good? I lied! Sort of. It's web developers who are bad.