File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -34,7 +34,11 @@ class FSCache {
3434 // Write mtimes for each dependent file that is already compiled into this asset
3535 for ( let dep of data . dependencies ) {
3636 if ( dep . includedInParent ) {
37- let stats = await fs . stat ( dep . name ) ;
37+ let depPath = dep . name ;
38+ if ( depPath [ depPath . length - 1 ] === '*' ) {
39+ depPath = path . dirname ( depPath ) ;
40+ }
41+ let stats = await fs . stat ( depPath ) ;
3842 dep . mtime = stats . mtime . getTime ( ) ;
3943 }
4044 }
@@ -47,7 +51,7 @@ class FSCache {
4751 await fs . writeFile ( this . getCacheFile ( filename ) , JSON . stringify ( data ) ) ;
4852 this . invalidated . delete ( filename ) ;
4953 } catch ( err ) {
50- logger . error ( ' Error writing to cache' , err ) ;
54+ logger . error ( ` Error writing to cache: ${ err . message } ` ) ;
5155 }
5256 }
5357
@@ -83,7 +87,7 @@ class FSCache {
8387
8488 let json = await fs . readFile ( cacheFile ) ;
8589 let data = JSON . parse ( json ) ;
86- if ( ! await this . checkDepMtimes ( data ) ) {
90+ if ( ! ( await this . checkDepMtimes ( data ) ) ) {
8791 return null ;
8892 }
8993
You can’t perform that action at this time.
0 commit comments