[node] Fix ESM dependency support (#9692)

This commit is contained in:
Chris Barber
2023-04-26 12:23:43 -05:00
committed by GitHub
parent fda76691d1
commit 65a6e713c8
54 changed files with 1750 additions and 138 deletions

View File

@@ -149,7 +149,7 @@ async function runProbe(probe, deploymentId, deploymentUrl, ctx) {
// we must eval it since we use devalue to stringify it
global.__BUILD_MANIFEST_CB = null;
ctx.nextBuildManifest = eval(
`self = {};` + manifestContent + `;self.__BUILD_MANIFEST`
`var self = {};` + manifestContent + `;self.__BUILD_MANIFEST`
);
}
let scriptRelativePath = ctx.nextBuildManifest[scriptName];