Skip to content

Commit

Permalink
fix(@angular-devkit/build-angular): avoid triggering file change afte…
Browse files Browse the repository at this point in the history
…r 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)
  • Loading branch information
alan-agius4 authored and josephperrott committed Apr 21, 2021
1 parent 1fef334 commit 33ca65a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ export function isPolyfillsEntry(name: string): boolean {
export function getWatchOptions(poll: number | undefined): Configuration['watchOptions'] {
return {
poll,
ignored: poll === undefined ? undefined : 'node_modules/**',
ignored: poll === undefined ? '**/$_lazy_route_resources' : 'node_modules/**',
};
}

Expand Down

0 comments on commit 33ca65a

Please sign in to comment.