Skip to content

FR: Configure tsx in tsconfig.json #36

@mikestopcontinues

Description

@mikestopcontinues

ts-node supports the following:

{
  "compilerOptions": {...},
  "ts-node": {
    "compilerOptions": {...},
    "require": [
      "dotenv-flow/config"
    ]
  }
}

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions