This commit is contained in:
hai-x 2025-10-06 14:10:18 +08:00 committed by GitHub
commit 219cb02e70
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 0 deletions

View File

@ -1042,6 +1042,9 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
logger: this.getLogger("webpack.FileSystemInfo"), logger: this.getLogger("webpack.FileSystemInfo"),
hashFunction: compiler.options.output.hashFunction hashFunction: compiler.options.output.hashFunction
}); });
if (compiler.watchMode) {
this.fileSystemInfo._checkContextTimestampHash = false;
}
if (compiler.fileTimestamps) { if (compiler.fileTimestamps) {
this.fileSystemInfo.addFileTimestamps(compiler.fileTimestamps, true); this.fileSystemInfo.addFileTimestamps(compiler.fileTimestamps, true);
} }

View File

@ -1245,6 +1245,7 @@ class FileSystemInfo {
this._cachedDeprecatedContextTimestamps = undefined; this._cachedDeprecatedContextTimestamps = undefined;
this._warnAboutExperimentalEsmTracking = false; this._warnAboutExperimentalEsmTracking = false;
this._checkContextTimestampHash = true;
this._statCreatedSnapshots = 0; this._statCreatedSnapshots = 0;
this._statTestedSnapshotsCached = 0; this._statTestedSnapshotsCached = 0;
@ -2918,6 +2919,7 @@ class FileSystemInfo {
} }
const snap = /** @type {ResolvedContextFileSystemInfoEntry} */ (s); const snap = /** @type {ResolvedContextFileSystemInfoEntry} */ (s);
if ( if (
this._checkContextTimestampHash &&
snap.timestampHash !== undefined && snap.timestampHash !== undefined &&
c.timestampHash !== snap.timestampHash c.timestampHash !== snap.timestampHash
) { ) {