mirror of
https://github.com/zebrajr/node.git
synced 2026-01-15 12:15:26 +00:00
doc: recommend setting noEmit: true in tsconfig.json
PR-URL: https://github.com/nodejs/node/pull/57320 Fixes: https://github.com/nodejs/node/issues/57294 Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com> Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
This commit is contained in:
@@ -81,6 +81,7 @@ but we recommend version 5.8 or newer with the following `tsconfig.json` setting
|
||||
```json
|
||||
{
|
||||
"compilerOptions": {
|
||||
"noEmit": true, // Optional - see note below
|
||||
"target": "esnext",
|
||||
"module": "nodenext",
|
||||
"rewriteRelativeImportExtensions": true,
|
||||
@@ -90,6 +91,10 @@ but we recommend version 5.8 or newer with the following `tsconfig.json` setting
|
||||
}
|
||||
```
|
||||
|
||||
> \[!NOTE]
|
||||
> Use the `noEmit` option if you intend to only execute `*.ts` files, for example a build script.
|
||||
> You won't need this flag if you intend to distribute `*.js` files for performance reasons.
|
||||
|
||||
### Determining module system
|
||||
|
||||
Node.js supports both [CommonJS][] and [ES Modules][] syntax in TypeScript
|
||||
|
||||
Reference in New Issue
Block a user