Set NODE_ENV #1281
-
How can i set NODE_ENV without using any global environment variable or using third party packages like cross-env? ts-node does not set any value to NODE_ENV so it's undefined. npx cross-env NODE_ENV=development ts-node index.ts I think it can be a nice idea to have an option that set NODE_ENV variable according to our needs. For example:
$ npx ts-node --node-env development
{
"ts-node": {
"node-env": "development"
},
"compilerOptions": {}
} Thanks in advance! 🎉 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
This is far out of scope for |
Beta Was this translation helpful? Give feedback.
This is far out of scope for
ts-node
. Any tool or library which accomplishes this fornode
will also work forts-node
, so I recommend using one of those.