Skip to content

ts-node's require hook is replicating the TS compiler too much #157

Closed
@weswigham

Description

@weswigham

With 1.2, ts-node swapped to using tsconfig to "simplify loading the tsconfig". The new dependency used to load a tsconfig file goes too far in trying to replicate tsc's default settings for compilation. At version 1.1 when using the require hook when there was no tsconfig present, ts-node only compiled the required file and anything it included. With version 1.2, it attempts to traverse the entire directory the required file is in and all subdirectories.

See this issue over at TypeScript for the problems this change caused.

I'd ask that you reconsider the change in behavior; while this behavior is OK for the TS compiler itself, it seems inappropriate for a require hook (which was invoked on a specific entrypoint).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions