XM Cloud Deploy now supports pnpm for dependency management, giving you another option for managing your monorepos.
XM Cloud Deploy now supports pnpm
XM Cloud
Here is how to use it:
Ensure pnpm is installed.
Inside the root
package.json
ensure thepackageManager
andengines
values are defined for pnpm."packageManager": "pnpm@9.11.0", "engines": { "node": ">=20.0.0", "pnpm": ">=9.11.0" }
Use pnpm and XM Cloud as usual.
Define your workspace
Add a
pnpm-workspace.yaml
file to the root of your project and define the packages.
Update the deployment configuration
Inside the
xmcloud.build.json
file andbuildCommand
andrunCommand
values."buildCommand": "install-build", "runCommand": "start:app"
Inside the root
package.json
, define your pnpm commands for your build and run steps.
"install-build": "pnpm install && pnpm build",
"start:app": "pnpm -F=node-xmcloud-sample start"
Deploy as usual
Loading...
Loading...
Loading...