Environment variables
Environment variable definitions are used for validation and documentation of the configuration management system in PWA Studio. Build scripts normally use the values set in the current environment, but it is sometimes necessary to use the definitions themselves, such as when an extension defines its own global config variables.
Access environment variable definition object
There are two ways to access the environment variable definitions object:
- Third-party code should use the builtin target
envVarDefinitionswhen adding definitions. - Core Buildpack code uses
getEnvVarDefinitions(), which builds environment variable definitions for the project. It starts with core variables listed below and then calls theenvVarDefinitionstarget so installed extensions can add their own variables.
<!-- The reference doc content is generated automatically from the source code. To update this section, update the doc blocks in the source code -->
data-src=../../../../includes/auto-generated/buildpack/reference/env-var-definitions.md