Siso doesn't handle symlinks in deps well. Fix our build in this area. (#33600)
This commit is contained in:
@@ -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)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user