@ngtools/webpack 11.2.1 → 11.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +3 -3
- package/src/ivy/plugin.js +7 -6
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ngtools/webpack",
|
|
3
|
-
"version": "11.2.
|
|
3
|
+
"version": "11.2.2",
|
|
4
4
|
"description": "Webpack plugin that AoT compiles your Angular components and modules.",
|
|
5
5
|
"main": "./src/index.js",
|
|
6
6
|
"typings": "src/index.d.ts",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
},
|
|
26
26
|
"homepage": "https://github.com/angular/angular-cli",
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@angular-devkit/core": "11.2.
|
|
28
|
+
"@angular-devkit/core": "11.2.2",
|
|
29
29
|
"enhanced-resolve": "5.7.0",
|
|
30
30
|
"webpack-sources": "2.2.0"
|
|
31
31
|
},
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
},
|
|
37
37
|
"engines": {
|
|
38
38
|
"node": ">= 10.13.0",
|
|
39
|
-
"npm": "^6.11.0",
|
|
39
|
+
"npm": "^6.11.0 || ^7.5.6",
|
|
40
40
|
"yarn": ">= 1.13.0"
|
|
41
41
|
}
|
|
42
42
|
}
|
package/src/ivy/plugin.js
CHANGED
|
@@ -319,7 +319,7 @@ class AngularWebpackPlugin {
|
|
|
319
319
|
if (!sourceFile.isDeclarationFile &&
|
|
320
320
|
!ignoreForEmit.has(sourceFile) &&
|
|
321
321
|
!angularCompiler.incrementalDriver.safeToSkipEmit(sourceFile)) {
|
|
322
|
-
this.requiredFilesToEmit.add(sourceFile.fileName);
|
|
322
|
+
this.requiredFilesToEmit.add(paths_1.normalizePath(sourceFile.fileName));
|
|
323
323
|
}
|
|
324
324
|
}
|
|
325
325
|
// NOTE: This can be removed once support for the deprecated lazy route string format is removed
|
|
@@ -328,7 +328,7 @@ class AngularWebpackPlugin {
|
|
|
328
328
|
this.lazyRouteMap[routeKey] = lazyRoute.referencedModule.filePath;
|
|
329
329
|
}
|
|
330
330
|
return this.createFileEmitter(builder, transformation_1.mergeTransformers(angularCompiler.prepareEmit().transformers, transformers), getDependencies, (sourceFile) => {
|
|
331
|
-
this.requiredFilesToEmit.delete(sourceFile.fileName);
|
|
331
|
+
this.requiredFilesToEmit.delete(paths_1.normalizePath(sourceFile.fileName));
|
|
332
332
|
angularCompiler.incrementalDriver.recordSuccessfulEmit(sourceFile);
|
|
333
333
|
});
|
|
334
334
|
});
|
|
@@ -384,10 +384,11 @@ class AngularWebpackPlugin {
|
|
|
384
384
|
}
|
|
385
385
|
createFileEmitter(program, transformers = {}, getExtraDependencies, onAfterEmit) {
|
|
386
386
|
return async (file) => {
|
|
387
|
-
|
|
388
|
-
|
|
387
|
+
const filePath = paths_1.normalizePath(file);
|
|
388
|
+
if (this.requiredFilesToEmitCache.has(filePath)) {
|
|
389
|
+
return this.requiredFilesToEmitCache.get(filePath);
|
|
389
390
|
}
|
|
390
|
-
const sourceFile = program.getSourceFile(
|
|
391
|
+
const sourceFile = program.getSourceFile(filePath);
|
|
391
392
|
if (!sourceFile) {
|
|
392
393
|
return undefined;
|
|
393
394
|
}
|
|
@@ -406,7 +407,7 @@ class AngularWebpackPlugin {
|
|
|
406
407
|
if (content !== undefined && this.watchMode) {
|
|
407
408
|
// Capture emit history info for Angular rebuild analysis
|
|
408
409
|
hash = hashContent(content);
|
|
409
|
-
this.fileEmitHistory.set(
|
|
410
|
+
this.fileEmitHistory.set(filePath, { length: content.length, hash });
|
|
410
411
|
}
|
|
411
412
|
const dependencies = [
|
|
412
413
|
...program.getAllDependencies(sourceFile),
|