diff --git a/tools/isobuild/js-analyze.js b/tools/isobuild/js-analyze.js index 171fb072c1..97b0c8f0ff 100644 --- a/tools/isobuild/js-analyze.js +++ b/tools/isobuild/js-analyze.js @@ -83,10 +83,6 @@ export function findImportedModuleIdentifiers(source, hash) { while (left < right && end < possibleIndexes[right - 1]) --right; if (left < right) { - if (isFunctionWithParameter(node, "require")) { - return; - } - let id = getRequiredModuleId(node); if (typeof id === "string") { identifiers[id] = node; @@ -129,18 +125,6 @@ function isNode(value) { && typeof value.end === "number"; } -function isFunctionWithParameter(node, name) { - if (node.type === "FunctionExpression" || - node.type === "FunctionDeclaration" || - node.type === "ArrowFunctionExpression") { - return node.params.some( - param => - param.type === "Identifier" && - param.name === name - ); - } -} - function getRequiredModuleId(node) { if (node.type === "CallExpression" && node.callee.type === "Identifier" &&