Skip to content

Commit 33ca65a

Browse files
alan-agius4josephperrott
authored andcommitted
fix(@angular-devkit/build-angular): avoid triggering file change after file build
When using the `ContextReplacementPlugin` https://github.com/angular/angular-cli/blob/master/packages/angular_devkit/build_angular/src/webpack/configs/common.ts#L496 the new resource path will be watched by Webpack file watcher. This causes a redundant file remove event after the first build, which causes another partial rebuild right way. Note: changing the call to ` new ContextReplacementPlugin(/\@angular(\\|\/)core(\\|\/)/);` doesn't address the problem. (cherry picked from commit eed56ab)
1 parent 1fef334 commit 33ca65a

File tree

1 file changed

+1
-1
lines changed
  • packages/angular_devkit/build_angular/src/webpack/utils

1 file changed

+1
-1
lines changed

packages/angular_devkit/build_angular/src/webpack/utils/helpers.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ export function isPolyfillsEntry(name: string): boolean {
121121
export function getWatchOptions(poll: number | undefined): Configuration['watchOptions'] {
122122
return {
123123
poll,
124-
ignored: poll === undefined ? undefined : 'node_modules/**',
124+
ignored: poll === undefined ? '**/$_lazy_route_resources' : 'node_modules/**',
125125
};
126126
}
127127

0 commit comments

Comments
 (0)