-
Notifications
You must be signed in to change notification settings - Fork 30.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
--env-file
support in NODE_OPTIONS
#51147
Comments
Well, that can raise many issues and confusion since you can define NODE_OPTIONS inside the env file |
I see, but I see no other solution for project specific |
Not really. Command line switches take priority over all other methods of defining the same values. Just ignore any |
I think this was working before version 20.12.x (related issue: remy/nodemon#2194). |
Not a related issue. They've opened an issue that is not related to nodemon at all (just to prevent confusion for anyone else) |
Closing since technically this is not possible with the current implementation. |
Can you please highlight what makes it "technically impossible"? |
With the current state it is not possible, I didn't say impossible :-) To summarize, if you refactor how we load and initialize node options as well as env file, it is possible. although, i think it will make both implementations more complex with little gain. if you think you can land it, with less unmaintainability, PRs are welcome. |
@anonrig you seem to have direct knowledge of why it is impossible. I am asking you to provide a summary of that knowledge. As a reader of this thread, there is nothing in it that tells me why it would be closed without being solved. |
You're right. I'll write an in depth analysis of my thoughts when I have the time. Meanwhile, I'm reopening the issue. |
This seems to be the closest I have found to my task. Perhaps someone here can give me a hint? I want to use I think I got closer to it with
Perhaps there is another way? |
What is the problem this feature will solve?
Sometimes env files are used as config files, therefore it should be allowed to set an
--env-file
inNODE_OPTIONS
, for example in the.npmrc
file, so that it applies to all scripts of that specific project.What is the feature you are proposing to solve the problem?
Allowing for the
--env-file
flag to be supported inNODE_OPTIONS
.What alternatives have you considered?
No response
The text was updated successfully, but these errors were encountered: