@ngtools/webpack 8.3.4 → 8.3.8

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ngtools/webpack",
3
- "version": "8.3.4",
3
+ "version": "8.3.8",
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": "8.3.4",
28
+ "@angular-devkit/core": "8.3.8",
29
29
  "enhanced-resolve": "4.1.0",
30
30
  "rxjs": "6.4.0",
31
31
  "tree-kill": "1.2.1",
@@ -107,10 +107,16 @@ class WebpackCompilerHost {
107
107
  }
108
108
  return;
109
109
  }
110
- for (const ext of this._virtualStyleFileExtensions) {
111
- const virtualFile = (fullPath + ext);
112
- if (this._memoryHost.exists(virtualFile)) {
113
- this._memoryHost.delete(virtualFile);
110
+ if (!exists) {
111
+ // At this point we're only looking at resource files (html/css/scss/etc).
112
+ // If the original was deleted, we should delete the virtual files too.
113
+ // If the original wasn't deleted we should leave them to be overwritten, because webpack
114
+ // might begin the loading process before our plugin has re-emitted them.
115
+ for (const ext of this._virtualStyleFileExtensions) {
116
+ const virtualFile = (fullPath + ext);
117
+ if (this._memoryHost.exists(virtualFile)) {
118
+ this._memoryHost.delete(virtualFile);
119
+ }
114
120
  }
115
121
  }
116
122
  }