What is the problem this feature will solve?
We already have --env-file and --watch:
$ node --env-file=.env --watch test.js
However, it seems we're missing the ability to watch the env file. The command above will not restart the script when the env file changes.
--watch-path=.env doesn't help either. It does restart the script when the env file changes, however the env file is not loaded again, so the script only has access to the environment variables that were loaded when the command was first ran.
What is the feature you are proposing to solve the problem?
A flag to watch the env file e.g. --watch-env-file.
What alternatives have you considered?
No response
What is the problem this feature will solve?
We already have
--env-fileand--watch:$ node --env-file=.env --watch test.jsHowever, it seems we're missing the ability to watch the env file. The command above will not restart the script when the env file changes.
--watch-path=.envdoesn't help either. It does restart the script when the env file changes, however the env file is not loaded again, so the script only has access to the environment variables that were loaded when the command was first ran.What is the feature you are proposing to solve the problem?
A flag to watch the env file e.g.
--watch-env-file.What alternatives have you considered?
No response