diff --git a/tools/isobuild/builder.js b/tools/isobuild/builder.js index e75ddb7493..9f1397c593 100644 --- a/tools/isobuild/builder.js +++ b/tools/isobuild/builder.js @@ -231,18 +231,19 @@ Previous builder: ${previousBuilder.outputPath}, this builder: ${outputPath}` return partsOut.join(files.pathSep); } + // Checks if a file with the same path and hash was written by - // the previous builder. If it was, it adds it to the cache. - // It also makes sure the parent directories exist and are part of the cache. - // + // the previous builder. If it was, it adds it to the cache and makes + // sure the parent directories exist and are part of the cache. + // // Returns true if the file was already written usePreviousWrite (relPath, hash, sanitize) { relPath = this._normalizeFilePath(relPath, sanitize); - this._ensureDirectory(files.pathDirname(relPath)); const previouslyWritten = this.previousWrittenHashes[relPath] === hash; if (previouslyWritten) { + this._ensureDirectory(files.pathDirname(relPath)); this.writtenHashes[relPath] = hash; this.usedAsFile[relPath] = true; } diff --git a/tools/isobuild/bundler.js b/tools/isobuild/bundler.js index c435af37ab..1adbfe88ae 100644 --- a/tools/isobuild/bundler.js +++ b/tools/isobuild/bundler.js @@ -1168,7 +1168,6 @@ class Target { data: resource.data, cacheable: false, hash: resource.hash, - sourcePath: resource.sourcePath, skipSri: !!resource.hash };