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

Dockerize a SvelteKit App Using PNPM

submited by
Style Pass
2022-01-23 15:00:08

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.

Start by creating a new SvelteKit project. If you already have one that’s great. Go ahead and create a new one anyway so you don’t face any integration issues while you’re trying this out. And make sure to use pnPM to install packages so you can appreciate an alternative universe with more disk space:

Upon installation, choose the Skeleton project when prompted and accept the defaults for the remaining prompts then install. You should see output like:

Leave a Comment