Set environment variables in local development

To test an Edge component on your system, supply environment values using the DXP CLI or a project-specific mechanism.

This populates info.env in a way that matches DXP behavior, within the limits of your local tool.

What to do

  1. Use the DXP CLI cmp dev command and pass variables as required for your shell, or set them through the process described in the reference.

  2. Confirm the component hot-reloads or restarts and that the UI reflects the value you set.

  3. If required variables are missing, fix the local configuration or make the variable required: false in the manifest.json file and handle the empty case in code. Read the Add environment variable configuration to your manifest documentation for more information.