Add _dataUsed property to prelink resources

The bundler expects this property to know if it should watch the resource.
This commit is contained in:
zodern
2022-04-13 15:59:50 -05:00
committed by denihs
parent 271497611e
commit f7044e561c

View File

@@ -120,6 +120,10 @@ export class Unibuild {
_.each(unibuildJson.resources, function (resource) {
rejectBadPath(resource.file);
if (resource.type === 'head') {
console.dir(resource);
}
const data = files.readBufferWithLengthAndOffset(
files.pathJoin(unibuildBasePath, resource.file),
resource.length,
@@ -153,7 +157,10 @@ export class Unibuild {
usesDefaultSourceProcessor: true,
legacyPrelink: {
packageVariables: unibuildJson.packageVariables || []
}
},
// Only published packages still use prelink resources,
// so there is no need to mark this file to be watched
_dataUsed: false
};
if (resource.sourceMap) {