X Tutup
Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion packages/bazel/src/ngc-wrapped/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,13 @@ function gatherDiagnosticsForInputsOnly(
// Note: We only get the diagnostics for individual files
// to e.g. not check libraries.
diagnostics.push(...tsProgram.getSyntacticDiagnostics(sf));
diagnostics.push(...tsProgram.getSemanticDiagnostics(sf));

// In local mode compilation the TS semantic check issues tons of diagnostics due to the fact
// that the file dependencies (.d.ts files) are not available in the program. So it needs to be
// disabled.
if (options.compilationMode !== 'experimental-local') {
diagnostics.push(...tsProgram.getSemanticDiagnostics(sf));
}
}

if (ngProgram instanceof ng.NgtscProgram) {
Expand Down
6 changes: 5 additions & 1 deletion packages/compiler-cli/src/ngtsc/core/src/compiler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -624,7 +624,11 @@ export class NgCompiler {
];

const afterDeclarations: ts.TransformerFactory<ts.SourceFile>[] = [];
if (compilation.dtsTransforms !== null) {

// In local compilation mode we don't make use of .d.ts files for Angular compilation, so their
// transformation can be ditched.
if (this.options.compilationMode !== 'experimental-local' &&
compilation.dtsTransforms !== null) {
afterDeclarations.push(declarationTransformFactory(
compilation.dtsTransforms, compilation.reflector, compilation.refEmitter,
importRewriter));
Expand Down
X Tutup