我有一个react应用和包含以下变量的.env.development文件
REACT_APP_API_KEY = AIzaSyCF27pRAz8
REACT_APP_AUTH_DOMAIN = blen.pp.com
REACT_APP_DATABASE_URL = https://bebaeio.com
REACT_APP_PROJECT_ID = bltale
REACT_APP_STORAGE_BUCKET = blepot.com
REACT_APP_MESSANGER_ID = 2806914
REACT_APP_ID = 1:2806911447cdcd63f5564ad
REACT_APP_MEASUREMENT_ID = G-0W
我想在终端中打印它们。在我的package.json中,我做了这样的事情
"scripts": {
"build": "gatsby build",
"develop": "printf '${REACT_APP_API_KEY}' && gatsby develop",
"format": "prettier --write \"**/*.{js,jsx,json,md}\"",
但这仅打印'${REACT_APP_API_KEY
。如何在终端中打印变量?