File tree 3 files changed +20
-16
lines changed
angular_devkit/build_angular
3 files changed +20
-16
lines changed Original file line number Diff line number Diff line change 15
15
"autoprefixer" : " 8.4.1" ,
16
16
"circular-dependency-plugin" : " 5.0.2" ,
17
17
"clean-css" : " 4.2.1" ,
18
- "copy-webpack-plugin" : " 4.5.2 " ,
18
+ "copy-webpack-plugin" : " 4.5.3 " ,
19
19
"file-loader" : " 2.0.0" ,
20
20
"glob" : " 7.1.3" ,
21
21
"istanbul" : " 0.4.5" ,
Original file line number Diff line number Diff line change @@ -88,21 +88,25 @@ export class WebpackCompilerHost implements ts.CompilerHost {
88
88
const fullPath = this . resolve ( fileName ) ;
89
89
this . _sourceFileCache . delete ( fullPath ) ;
90
90
91
+ let exists = false ;
91
92
try {
92
- const exists = this . _syncHost . isFile ( fullPath ) ;
93
+ exists = this . _syncHost . isFile ( fullPath ) ;
93
94
if ( exists ) {
94
95
this . _changedFiles . add ( fullPath ) ;
95
96
}
96
- } catch {
97
- // File doesn't exist anymore, so we should delete the related virtual files.
98
- if ( fullPath . endsWith ( '.ts' ) ) {
99
- this . _virtualFileExtensions . forEach ( ext => {
100
- const virtualFile = fullPath . replace ( / \. t s $ / , ext ) as Path ;
101
- if ( this . _memoryHost . exists ( virtualFile ) ) {
102
- this . _memoryHost . delete ( virtualFile ) ;
103
- }
104
- } ) ;
105
- }
97
+ } catch { }
98
+
99
+ // File doesn't exist anymore and is not a factory, so we should delete the related
100
+ // virtual files.
101
+ if ( ! exists && fullPath . endsWith ( '.ts' ) && ! (
102
+ fullPath . endsWith ( '.ngfactory.ts' ) || fullPath . endsWith ( '.shim.ngstyle.ts' )
103
+ ) ) {
104
+ this . _virtualFileExtensions . forEach ( ext => {
105
+ const virtualFile = ( fullPath . slice ( 0 , - 3 ) + ext ) as Path ;
106
+ if ( this . _memoryHost . exists ( virtualFile ) ) {
107
+ this . _memoryHost . delete ( virtualFile ) ;
108
+ }
109
+ } ) ;
106
110
}
107
111
}
108
112
Original file line number Diff line number Diff line change @@ -2285,10 +2285,10 @@ copy-descriptor@^0.1.0:
2285
2285
resolved "https://registry.yarnpkg.com/copy-descriptor/-/copy-descriptor-0.1.1.tgz#676f6eb3c39997c2ee1ac3a924fd6124748f578d"
2286
2286
integrity sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=
2287
2287
2288
-
2289
- version "4.5.2 "
2290
- resolved "https://registry.yarnpkg.com/copy-webpack-plugin/-/copy-webpack-plugin-4.5.2 .tgz#d53444a8fea2912d806e78937390ddd7e632ee5c "
2291
- integrity sha512-zmC33E8FFSq3AbflTvqvPvBo621H36Afsxlui91d+QyZxPIuXghfnTsa1CuqiAaCPgJoSUWfTFbKJnadZpKEbQ ==
2288
+
2289
+ version "4.5.3 "
2290
+ resolved "https://registry.yarnpkg.com/copy-webpack-plugin/-/copy-webpack-plugin-4.5.3 .tgz#14a224d205e46f7a79f7956028e1da6df2225ff2 "
2291
+ integrity sha512-VKCiNXQcc8zyznaepXfKpCH2cZD+/j3T3B+gsFY97P7qMlEsj34wr/sI9OCG7QPUUh7gAHVx3q8Q1rdQIDM4bA ==
2292
2292
dependencies :
2293
2293
cacache "^10.0.4"
2294
2294
find-cache-dir "^1.0.0"
You can’t perform that action at this time.
0 commit comments