diff --git a/tools/isobuild/compiler-plugin.js b/tools/isobuild/compiler-plugin.js index 482903b067..164fca22c0 100644 --- a/tools/isobuild/compiler-plugin.js +++ b/tools/isobuild/compiler-plugin.js @@ -664,7 +664,7 @@ class ResourceSlot { // If a compiler plugin calls addJavaScript with the same // sourcePath, that code should take precedence over this empty // stub, so this property marks the resource as disposable. - emtpyStub: true, + implicit: true, lazy: true, }); diff --git a/tools/isobuild/import-scanner.js b/tools/isobuild/import-scanner.js index f95fa14556..66bccb91b1 100644 --- a/tools/isobuild/import-scanner.js +++ b/tools/isobuild/import-scanner.js @@ -160,14 +160,14 @@ export default class ImportScanner { if (old) { // If the old file is just an empty stub, let the new file take // precedence over it. - if (old.emptyStub === true) { + if (old.implicit === true) { return this.absPathToOutputIndex[absPath] = file; } // If the new file is just an empty stub, pretend the _addFile // succeeded by returning the old file, so that we won't try to call // _combineFiles needlessly. - if (file.emptyStub === true) { + if (file.implicit === true) { return old; } @@ -507,11 +507,11 @@ export default class ImportScanner { if (depFile) { // If the module was imported implicitly before, update to the // explicit version now. - if (depFile.imported === "implicit") { + if (depFile.implicit === true) { const file = this._readModule(absImportedPath); if (file) { + depFile.implicit = false; Object.assign(depFile, file); - depFile.imported = true; } } @@ -837,13 +837,14 @@ export default class ImportScanner { servePath: relPkgJsonPath, hash: sha1(data), lazy: true, + imported: true, // Since _addPkgJsonToOutput is only ever called for package.json // files that are involved in resolving package directories, and // pkg is only a subset of the information in the actual - // package.json module, we mark it as being imported implicitly, - // so that the subset can be overridden by the actual module if - // this package.json file is imported explicitly elsewhere. - imported: "implicit", + // package.json module, we mark it as imported implicitly, so that + // the subset can be overridden by the actual module if this + // package.json file is imported explicitly elsewhere. + implicit: true, }; this._addFile(pkgJsonPath, pkgFile);