webdev

Dockerize a SvelteKit App Using PNPM

7 minute read Published

Optimized development workflow using SvelteKit, PNPM and Docker.

Developers don’t just use pNPM because they hate NPM (that’s what Yarn is for). They use it because node_modules are the heaviest objects in the universe. But there are other things to love about PNpm besides its ability to shave gigabytes off your hard disk and saving you a considerable amount of time wasted mucking around with node_modules. Here I’ll show you how to use pnpm fetch to increase the speed of your Docker builds using an --offline install.

Deadsimple Lazyloaded Images in Svelte

2 minute read Published

Easy to implement lazyloading in Svelte perfect for image galleries.

Next to text compression image lazyloading is one of the best ways to improve performance on a website. And with Svelte its no different. So here I’m going to share a radically simple way to accomplish lazyloading with Svelte.

Svelte Is The Sex Appeal React Never Had

2 minute read Published

What could be sexier than not shipping 5MB of JavaScript just to load a page?

The @sveltejs/adapter-vercel NPM module has seen some impressive growth over the last two months. In early November 2021 it was seeing about 4,000 weekly downloads. As of mid-January 2022 that number has climbed to over 18,000. What’s fueling the growth? Vercel’s zero-configuration deployments of SvelteKit perhaps? Nope, most certainly it was Rich Harris joining the Vercel team which was announced at the same time the adapter started taking off.

Hugo Deploy: Migrating from S3 Website

10 minute read Published

How to install and configure Hugo for Amazon S3 deployments using Docker.
Scala is great and all though I’m not familiar with it and the maintainer of the deployment tool I’ve been using since 2016 ended active support for s3_website earlier this year. That’s too bad because s3_website was a huge breath of fresh air for me given its support for deploying both Jekyll and Hugo, among others. In addition to its support for various generators s3_website also has some novel features for deployments to AWS not trivial otherwise including: