Skip to content

Empty TS_NODE_IGNORE defaults to node_modules/ #1301

@inad9300

Description

@inad9300

Expected Behavior

Running TS_NODE_IGNORE= webpack should make ts-node (internally used by webpack) take into account references to TypeScript files contained in node_modules/.

Actual Behavior

It behaves the same as if TS_NODE_IGNORE was not defined at all. When setting TS_NODE_IGNORE to a dummy value, e.g. TS_NODE_IGNORE=/non-existent-directory webpack, things work as expected.

Steps to reproduce the problem

Clone https://github.com/inad9300/webpack-typescript-loader/tree/ts-node-ignore, run npm i and npm start. Compare this with npm run really-start.

Specifications

  • ts-node version: 9.1.1
  • node version: 14.16.0
  • TypeScript version: 4.2.4
  • tsconfig.json, if you're using one:
{
  "compilerOptions": {
    "target": "es5",
    "module": "commonjs",
    "moduleResolution": "node"
  }
}
  • Operating system and version: latest macOS

Metadata

Metadata

Assignees

No one assigned

    Labels

    you can do thisGood candidate for a pull request.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions