fix(ivy): ensure that changes to component resources trigger incremental builds (#30954)
Optimizations to skip compiling source files that had not changed did not account for the case where only a resource file changes, such as an external template or style file. Now we track such dependencies and trigger a recompilation if any of the previously tracked resources have changed. This will require a change on the CLI side to provide the list of resource files that changed to trigger the current compilation by implementing `CompilerHost.getModifiedResourceFiles()`. Closes #30947 PR Close #30954
This commit is contained in:

committed by
Kara Erickson

parent
dc613b336d
commit
48def92cad
@ -0,0 +1,20 @@
|
||||
|
||||
/**
|
||||
* @license
|
||||
* Copyright Google Inc. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style license that can be
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
import * as ts from 'typescript';
|
||||
|
||||
/**
|
||||
* Implement this interface to record what resources a source file depends upon.
|
||||
*/
|
||||
export interface ResourceDependencyRecorder {
|
||||
recordResourceDependency(file: ts.SourceFile, resourcePath: string): void;
|
||||
}
|
||||
|
||||
export class NoopResourceDependencyRecorder implements ResourceDependencyRecorder {
|
||||
recordResourceDependency(): void {}
|
||||
}
|
Reference in New Issue
Block a user