webiny-js
webiny-js copied to clipboard
Watch on custom app does not include environment scoped .env files
Version
5.15.0
Operating System
MacOS
Browser
Firefox
What steps will reproduce the bug?
Create a custom app that references process.env.REACT_APP_FOO Create a .env.dev file at the copy of the project with REACT_APP_FOO=1
Run watch or deploy
What is the expected behavior?
The environment values from the .env.dev file should be applied to the app context.
What do you see instead?
No values are included.
Additional information
I've attached the config file with my solution to the problem. It would be helpful if this were the standard behavior.
Notable features:
- loads the environment files first, then applies default values from the code for missing values (the reverse order does not work because config() skips already set values)
Possible solution
No response
This issue is stale because it was opened 120 days with no activity. Remove the "stale-issue" label or leave a comment to revive the issue. Otherwise, it will be closed in 7 days.
This issue is stale because it was opened 120 days with no activity. Remove the "stale-issue" label or leave a comment to revive the issue. Otherwise, it will be closed in 7 days.