- Create
.envfile on the root directory
REACT_APP_VERSION=$npm_package_version- Access from environment variables on React app
const version = process.env.REACT_APP_VERSIONNote: React only makes accessible environment variables that are prefixed with REACT_APP_