I am developing a next.js app. It has the following tsconfig.js
{
\"compilerOptions\": {
\"target\": \"ES2018\",
\"module\": \"esnext\",
--incremental
with --noEmit
is possible now:
"compilerOptions": {
"noEmit": true,
"incremental": true,
// "tsBuildInfoFile": "/tmp/my-proj/tsbuildinfo" // custom build info file path
// ...
}
The build info file is emitted even with noEmit
. You can set its explicit location via --tsBuildInfoFile. Otherwise outDir
- if still set - or tsconfig.json
project root is taken as emit directory.
"compilerOptions": {
"incremental": true,
"declaration": true,
"emitDeclarationOnly": true, // to emit at least something
// "noEmit": true,
// ...
// Either set overall output directory
"outDir": "dist",
// or separate locations for build file and declarations
// "declarationDir": "dist"
// "tsBuildInfoFile": "/tmp/my-proj/tsbuildinfo"
}