-
-
Notifications
You must be signed in to change notification settings - Fork 33.5k
Closed
Labels
dotenvIssues and PRs related to .env file parsingIssues and PRs related to .env file parsingfeature requestIssues that request new features to be added to Node.js.Issues that request new features to be added to Node.js.good first issueIssues that are suitable for first-time contributors.Issues that are suitable for first-time contributors.watch-modeIssues and PRs related to watch modeIssues and PRs related to watch mode
Description
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
tremblaysimon
Metadata
Metadata
Assignees
Labels
dotenvIssues and PRs related to .env file parsingIssues and PRs related to .env file parsingfeature requestIssues that request new features to be added to Node.js.Issues that request new features to be added to Node.js.good first issueIssues that are suitable for first-time contributors.Issues that are suitable for first-time contributors.watch-modeIssues and PRs related to watch modeIssues and PRs related to watch mode