Publish your standalone Constellation DX components to the Pega Platform™ Server so that the component is discoverable as you author in the component palette. As a result, you can use the components while building the UI of your application.

Before you begin:

  • Ensure that you have authentication to access the resources in the Pega Platform Server to list, publish, or delete components. For more information, see Authenticating Pega Platform Server user access for standalone Constellation DX components.
  • Ensure that your default access group is mapped to the application where you want to publish the component. If you do not use your default access group, use the full application URL alias.
  • Ensure that you can access the Ruleset to which you want to publish your component.
  • If you are using DXCB 25.1.10, ensure that you publish the component to a Ruleset that is not a Branch Ruleset. Publishing the component to a Branch Ruleset results in an error.

  1. Open your preferred terminal tool.
  2. Enter npm run publish.
  3. Complete the parameter values:
    1. Select the component that you want to publish.
    2. For the rulesetName, enter the name of the ruleset.
    3. For the rulesetVersion, enter the version of the ruleset.
      NOTE:
      • Make sure you unlock the relevant ruleset version before you publish the component.
      • If you are using a version earlier than Pega Platform '25, ensure that the component is added to the highest ruleset version of the application.
    4. For the devBuild, enter Y to allow debugging or n to compress and obfuscate the code.
      NOTE: Setting devBuild to Y allows you to use your browser's developer tools to set breakpoints in your component code. devBuild also generates sourceMaps for this purpose. During development and debugging of your component, set devBuild to Y to debug and troubleshoot your code. When you are ready to publish your component for deployment to another environment, set devBuild to N as it will decrease the size of your bundled component.

    A sample set of values to be entered by the user to publish a component

    Publishing the component
    NOTE: You can also preconfigure the values in a tasks.config.json file.

    For example:

    {
       "components-server-config": {
          "server": "http://127.0.0.1:8080/prweb",
          "user": "customcomponentoperator",
          "password": "pwd"
          "rulesetName": "TestPega-C11nGall",
          "rulesetVersion": "01-01-03",
          "sourceOfComponents": "Server",
          "devBuild": false,
       }
    }
  4. Optional: To list your Constellation DX components and ensure that your component is displayed in the list, run the npm run list command.

Result:

The component publication is complete and application developers can now use the component in the authoring view of App Studio. The component uses the following naming convention:

<organization>_<library>_<component name>

NOTE:
  • Starting from Pega Platform '25, after you publish the component, Pega Platform creates the corresponding Rule-UI-Component and Rule-File-Text Rules. For more information, see Rule resolution for standalone components.
  • After publishing a standalone component, if it is not visible for selection in App Studio, please refresh the browser.
  • In some cases, the preview of the standalone component might not appear in App Studio. However, you can still configure the standalone component in App Studio.
  • Publishing all standalone components (npm run publishAll) follows the same procedure, except for selecting individual components. The Constellation DX Component Builder automatically validates and publishes all standalone components sequentially in the selected component category.

    Using arguments with the publishAll command is not recommended. You are responsible for troubleshooting any issues that may arise as a result of using arguments.

  • If you are using Pega Platform '24.2 or earlier versions, when you view a published standalone component in App Studio or any Constellation portal, you will be viewing the latest published version of the component for that environment regardless of rule resolution.
  • Starting from Pega Platform '25, when you view a published standalone component in App Studio or any Constellation portal, you will be viewing the latest published version of the component for that environment based on rule resolution. With rule resolution, if you publish the component to a lower ruleset version, you may not be viewing the latest published version of the component.