- Report full error messages and option errors, and survive a dead compiler process - thanks @johnnyreilly
Fixes for the TypeScript 7.1 API integration:
-
Error messages include their elaboration again (the indented "Types of parameters ... are incompatible" lines), which 10.0.0-beta.0 dropped.
-
Compiler option errors, such as an option TypeScript 7 has removed, are reported when type checking and not only with
transpileOnly. -
With
transpileOnly, a compiler option error is reported once per build, not once per file as well. -
In watch mode, a change to
tsconfig.jsonis picked up on the next rebuild when type checking. Before, the TypeScript project kept the options it started with. -
If the TypeScript compiler process dies, ts-loader starts a new one and adds a warning to the build. Before, every later build of a watch session failed.
-
Restore the
compilerOptionsandcontextloader options - thanks @johnnyreilly
Both were removed in 10.0.0-beta.0 and work again as they did in v9. compilerOptions overrides compiler options from tsconfig.json. context is an absolute path that relative paths in the TypeScript config are resolved against; with it set, a relative extends in the root config is also resolved against it.
- Emit declarations once per build, check new files, and drop orphaned source map options - thanks @johnnyreilly
More fixes for the TypeScript 7.1 API integration:
-
With
declarationorcomposite, builds are much faster: declarations are emitted once per build, not for every project file on every file compiled. A 300-file build went from 16s to 1.2s. -
In watch mode, a file created under the tsconfig's
includethat webpack doesn't bundle is now type checked. Its errors appear on the next rebuild. -
When the
compilerOptionsloader option turns off an option that others intsconfig.jsondepend on, those are dropped too, so the override alone doesn't cause TS5051 or TS5069. This coverssourceMap,inlineSourceMapanddeclarationMap(forinlineSources,sourceRoot,mapRoot) anddeclaration(fordeclarationMap,declarationDir,emitDeclarationOnly). -
Only parse the config for new files when a project folder has changed - thanks @johnnyreilly
Looking for newly created files no longer costs a config parse on every rebuild; it cost a few milliseconds per rebuild, mostly on Windows.