Configuration for Peanut for Wordpress is handled by creating a "peanut.config.json" in root directory of your "elements" source directory.
This file will allow you to update any of the environment variables that are used to set custom values used within the application.
An example of how to setup the directory structure of your "elements" source folder can be found by visiting our examples GitHub repo.
Sample configuration JSON
To create a custom configuration file (peanut.config.json) and element subfolders for your project within your current working directory, you can use the setup CLI command:
Configurable Environment Variables
All environment variables are set as strings.
ENVIRONMENT
Sets the compilation environment settings.
Values: "local", "prod"
Default: "local"
PFWP_SSE_HOST
Defines the hostname used for the HMR and SSE server. Used for send HMR updates.