Pnpm with Cloudlfare pages

This has already been asked previously few years back. However, no suitable solution was provided.

We’re migrating from Vercel to Cloudflare, and unfortunately, CF Pages doesn’t seem to support pnpm. We don’t want to move away from pnpm, considering the performance and size it provides.

Is it possible to use pnpm with CF Pages?

My understanding is the new Build Image v2, now in opt-in beta, supports pnpm without any hassle

“For new projects, these updated defaults and added support for pnpm and Yarn 3 mean that more projects will just work immediately without any undue setup”
Under Settings → Builds & Deployments → Build System Version, you can opt into the beta.
Magic Link: https://dash.cloudflare.com/?to=/:account/pages/view/:pages-project/settings/builds-deployments