Skip to content

Commit 102cd86

Browse files
filipesilvavikerman
authored andcommitted
fix(@angular-devkit/build-angular): don't double process factory files
1 parent fe54ab8 commit 102cd86

File tree

2 files changed

+3
-1
lines changed
  • packages

2 files changed

+3
-1
lines changed

packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/common.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -468,6 +468,8 @@ export function getCommonConfig(wco: WebpackConfigOptions): Configuration {
468468
},
469469
{
470470
test: /\.js$/,
471+
// Factory files are processed by BO in the rules added in typescript.ts.
472+
exclude: /(ngfactory|ngstyle)\.js$/,
471473
...buildOptimizerUseRule,
472474
},
473475
{

packages/ngtools/webpack/src/compiler_host.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ export class WebpackCompilerHost implements ts.CompilerHost {
144144
if (!exists) {
145145
// At this point we're only looking at resource files (html/css/scss/etc).
146146
// If the original was deleted, we should delete the virtual files too.
147-
// If the original it wasn't deleted we should leave them to be overwritten, because webpack
147+
// If the original wasn't deleted we should leave them to be overwritten, because webpack
148148
// might begin the loading process before our plugin has re-emitted them.
149149
for (const ext of this._virtualStyleFileExtensions) {
150150
const virtualFile = (fullPath + ext) as Path;

0 commit comments

Comments
 (0)