Skip to content

Commit 5257673

Browse files
filipesilvahansl
authored andcommitted
fix(@ngtools/webpack): fix rebuild speed regression
See #7995 (comment) for details. Fix regression introduced in #7998
1 parent e83dd93 commit 5257673

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -599,8 +599,9 @@ export function ngcLoader(this: LoaderContext & { _compilation: any }, source: s
599599
_getResourcesUrls(refactor).forEach((url: string) => {
600600
this.addDependency(path.resolve(path.dirname(sourceFileName), url));
601601
});
602+
// Dependencies must use system path separator.
602603
_getImports(refactor, compilerOptions, plugin.compilerHost, plugin.moduleResolutionCache)
603-
.forEach((importString: string) => this.addDependency(importString));
604+
.forEach(dep => this.addDependency(dep.replace(/\//g, path.sep)));
604605
})
605606
.then(() => {
606607
if (source) {

0 commit comments

Comments
 (0)