File tree Expand file tree Collapse file tree 3 files changed +20
-16
lines changed
angular_devkit/build_angular Expand file tree Collapse file tree 3 files changed +20
-16
lines changed Original file line number Diff line number Diff line change 1515 "autoprefixer" : " 8.4.1" ,
1616 "circular-dependency-plugin" : " 5.0.2" ,
1717 "clean-css" : " 4.2.1" ,
18- "copy-webpack-plugin" : " 4.5.2 " ,
18+ "copy-webpack-plugin" : " 4.5.3 " ,
1919 "file-loader" : " 2.0.0" ,
2020 "glob" : " 7.1.3" ,
2121 "istanbul" : " 0.4.5" ,
Original file line number Diff line number Diff line change @@ -88,21 +88,25 @@ export class WebpackCompilerHost implements ts.CompilerHost {
8888 const fullPath = this . resolve ( fileName ) ;
8989 this . _sourceFileCache . delete ( fullPath ) ;
9090
91+ let exists = false ;
9192 try {
92- const exists = this . _syncHost . isFile ( fullPath ) ;
93+ exists = this . _syncHost . isFile ( fullPath ) ;
9394 if ( exists ) {
9495 this . _changedFiles . add ( fullPath ) ;
9596 }
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+ } ) ;
106110 }
107111 }
108112
Original file line number Diff line number Diff line change @@ -2285,10 +2285,10 @@ copy-descriptor@^0.1.0:
22852285 resolved "https://registry.yarnpkg.com/copy-descriptor/-/copy-descriptor-0.1.1.tgz#676f6eb3c39997c2ee1ac3a924fd6124748f578d"
22862286 integrity sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=
22872287
2288- copy-webpack-plugin@4.5.2 :
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+ copy-webpack-plugin@4.5.3 :
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 ==
22922292 dependencies :
22932293 cacache "^10.0.4"
22942294 find-cache-dir "^1.0.0"
You can’t perform that action at this time.
0 commit comments