Siso doesn't handle symlinks in deps well. Fix our build in this area. (#33600)

This commit is contained in:
Aleksei Khoroshilov
2026-02-03 19:44:03 +07:00
committed by GitHub
parent 79cc97c87f
commit 419b6ff3dc
+5 -1
View File
@@ -36,7 +36,11 @@ class GenerateDepfilePlugin {
// These hooks cannot be used async, so must do sync ops.
compiler.hooks.compilation.tap(this.constructor.name, (compilation) => {
compilation.hooks.finishModules.tap(this.constructor.name, (modules) => {
const absoluteDepsPaths = Array.from(modules).map(module => module.resource)
// Resolve all symlinks/junctions to real paths. Siso doesn't handle
// junctions on Windows well, so we need to resolve them here.
const absoluteDepsPaths = Array.from(modules)
.filter(module => module.resource)
.map(module => fs.realpathSync(module.resource))
const depfileContent = generateDepfileContent(this.options.depfileSourceName, absoluteDepsPaths)
writeDepfileContentSync(this.options.depfilePath, depfileContent)
})