It works locally and use less disk space: We can go to web/ api and pnpm install. All packages are stored in <root project dir>/node_modules
Cons 👎
~Need to change build command on Vercel. So far I haven't succeeded yet, and build time increased from ≈35s to ≈1min.~ Seems like Vercel can recognize pnpm even inside a sub-directory, so no need to change build command except specifying which directory the Next project is (in our case, web/). Still building time is ~1min 😕 Also got warnings about unsupported node 16 and old pnpm version (Vercel uses node 14 and pnpm 6).
Still haven't found a way to build Docker image and deploy to Fly.io. Prolly there is but I'm bored to research 😢 Check https://pnpm.io/cli/fetch
What
Try to use pnpm instead of yarn.
Pros 👍
web
/api
andpnpm install
. All packages are stored in<root project dir>/node_modules
Cons 👎
web/
). Still building time is ~1min 😕 Also got warnings about unsupported node 16 and old pnpm version (Vercel uses node 14 and pnpm 6).