We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 645e56b commit ebd87adCopy full SHA for ebd87ad
packages/@ngtools/webpack/src/plugin.ts
@@ -390,9 +390,9 @@ export class AotPlugin implements Tapable {
390
// Wait for the plugin to be done when requesting `.ts` files directly (entry points), or
391
// when the issuer is a `.ts` file.
392
compiler.resolvers.normal.plugin('before-resolve', (request: any, cb: () => void) => {
393
- if (request.request.endsWith('.ts')
394
- || (request.context.issuer && request.context.issuer.endsWith('.ts'))) {
395
- this.done!.then(() => cb(), () => cb());
+ if (this.done && (request.request.endsWith('.ts')
+ || (request.context.issuer && request.context.issuer.endsWith('.ts')))) {
+ this.done.then(() => cb(), () => cb());
396
} else {
397
cb();
398
}
0 commit comments