webiny-js icon indicating copy to clipboard operation
webiny-js copied to clipboard

Watch on custom app does not include environment scoped .env files

Open snstanton opened this issue 3 years ago • 2 comments

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

webiny.config.ts.txt

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

snstanton avatar Oct 14 '21 19:10 snstanton

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.

webiny-bot avatar Feb 20 '22 07:02 webiny-bot

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.

webiny-bot avatar Jun 21 '22 07:06 webiny-bot