I’ve been researching on optimization that can be done in one of the project’s CI pipeline. The issue is that the whole process can take a very long time including time to set up the project and running all the tests. So I’ve been looking at
From my experience, the time taken to install the packages can be reduced to just seven seconds (from around almost two minutes, with cache primed) so this is a very welcomed changes. Every second matters.
Once I got the
pnpm installed, it’s pretty much a drop-in replacement for
- Migrate any
package.jsonto its own specific
pnpm import. This will allow
pnpmto create its own version of the lockfile,
pnpm-lock.yamlbased on the current lockfile used in the project (
- Install the dependencies via
- Replace any
npm runcommand with
pnpm buildinstead of
npm run build.