Go to the homepage
Powered bySitecore Search logo
Skip to main contentThe XM Cloud Deploy now supports pnpm page has loaded.

XM Cloud Changelog

Learn more about new versions, changes and improvements for XM Cloud

XM Cloud Deploy now supports pnpm

XM Cloud

XM Cloud

New feature

XM Cloud Deploy now supports pnpm for dependency management, giving you another option for managing your monorepos.

Here is how to use it:

  1. Ensure pnpm is installed.

    • Inside the root package.json ensure the packageManager and engines values are defined for pnpm.

      "packageManager": "pnpm@9.11.0",
      "engines": {
        "node": ">=20.0.0",
        "pnpm": ">=9.11.0"
      }

  2. Use pnpm and XM Cloud as usual.

  3. Define your workspace

    • Add a pnpm-workspace.yaml file to the root of your project and define the packages.

  4. Update the deployment configuration

    • Inside the xmcloud.build.json file and define the buildCommand and runCommand 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"
  1. Deploy as usual

Loading...
Loading...
Loading...

© Copyright 2024, Sitecore. All Rights Reserved