-
-
Notifications
You must be signed in to change notification settings - Fork 170
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
FR: Configure tsx
in tsconfig.json
#36
Comments
tsx is a wrapper around Node.js, so it doesn't actually expose Seeing as You can also add it via {
"scripts": {
"dotenv-run": "NODE_OPTIONS='--require dotenv-flow/config' npm run",
...
}
} and run scripts via:
In terms of configuration, I would like to align more closely with Node.js than |
The main benefit to me is that all scripts I write across my monorepo automatically benefit from the config, rather than requiring boilerplate in the form of import statements or cli args. That said, I do understand wanting to keep your surface area small. So I'd consider this issue resolved. Perhaps I should write a script that merely wraps |
This feature is required for my situation. I am detecting my .env based on branch/function so I need to require one ts file every time in my script and that is not good. I hope this feature will release soon... |
If you think of |
ts-node
supports the following:In my monorepo, this makes it really easy to keep config out of CLI args. In particular, having access to
require
makes all my scripts draw env-vars properly with minimum fuss.I'd like to be able to do the same thing with
tsx
. I saw a previous ticket where you expose--require
, though it's undocumented in the CLI help text. I'm not against using it for the time being, but for dozens of scripts, it's overkill to insert it everywhere.Thanks for such an awesome project!
The text was updated successfully, but these errors were encountered: