简体   繁体   中英

React reload .env variables after Changing them

in my react app I have a.env file and every time I change them I can't see the change until I stop and npm start again is there a faster why to do it?

Environment variables are passed to process (npm start), so those are stable for 1 process. So that's why you need to kill process and start again, cause variables are already passed and there is no way to hot reload.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM