Skip to content

Commit 813fd68

Browse files
nename0filipesilva
authored andcommitted
fix(@ngtools/webpack): redo #7619 in angular_compiler_plugin
1 parent 5eea7fa commit 813fd68

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/@ngtools/webpack/src/angular_compiler_plugin.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -601,9 +601,9 @@ export class AngularCompilerPlugin implements Tapable {
601601
// Wait for the plugin to be done when requesting `.ts` files directly (entry points), or
602602
// when the issuer is a `.ts` or `.ngfactory.js` file.
603603
compiler.resolvers.normal.plugin('before-resolve', (request: any, cb: () => void) => {
604-
if (request.request.endsWith('.ts')
605-
|| (request.context.issuer && /\.ts|ngfactory\.js$/.test(request.context.issuer))) {
606-
this.done!.then(() => cb(), () => cb());
604+
if (this.done && (request.request.endsWith('.ts')
605+
|| (request.context.issuer && /\.ts|ngfactory\.js$/.test(request.context.issuer)))) {
606+
this.done.then(() => cb(), () => cb());
607607
} else {
608608
cb();
609609
}

0 commit comments

Comments
 (0)