We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d6c07c7 commit 37bc9baCopy full SHA for 37bc9ba
packages/@ngtools/webpack/src/plugin.ts
@@ -378,8 +378,11 @@ export class AotPlugin implements Tapable {
378
379
compiler.plugin('after-resolvers', (compiler: any) => {
380
// Virtual file system.
381
+ // Wait for the plugin to be done when requesting `.ts` files directly (entry points), or
382
+ // when the issuer is a `.ts` file.
383
compiler.resolvers.normal.plugin('before-resolve', (request: any, cb: () => void) => {
- if (request.request.match(/\.ts$/)) {
384
+ if (request.request.endsWith('.ts')
385
+ || (request.context.issuer && request.context.issuer.endsWith('.ts'))) {
386
this.done!.then(() => cb(), () => cb());
387
} else {
388
cb();
0 commit comments