Skip to content
Browse files

Add VS Code env note to README (#738)

  • Loading branch information...
Zlatkovsky authored and blakeembrey committed Feb 9, 2019
1 parent 2609663 commit efaf67af47dfd80f61cb8ec526dda8c11ed5461b
Showing with 2 additions and 0 deletions.
  1. +2 −0
@@ -87,6 +87,8 @@ Create a new node.js configuration, add `-r ts-node/register` to node args and m

**Note:** If you are using the `--project <tsconfig.json>` command line argument as per the [Configuration Options](#configuration-options), and want to apply this same behavior when launching in VS Code, add an "env" key into the launch configuration: `"env": { "TS_NODE_PROJECT": "<tsconfig.json>" }`.

## How It Works

**TypeScript Node** works by registering the TypeScript compiler for `.tsx?` and `.jsx?` (when `allowJs == true`) extensions. When node.js has an extension registered (via `require.extensions`), it will use the extension internally for module resolution. When an extension is unknown to node.js, it handles the file as `.js` (JavaScript). By default, **TypeScript Node** avoids compiling files in `/node_modules/` for three reasons:

0 comments on commit efaf67a

Please sign in to comment.
You can’t perform that action at this time.