in packages/babel-preset-fbjs/plugins/inline-requires.js [193:218]
function parseInlineableMemberAlias(path, state) {
const module = getInlineableModule(path, state);
if (module == null) {
return null;
}
const { moduleName, requireFnName } = module;
const isValid =
path.parent.type === 'MemberExpression' &&
path.parentPath.parent.type === 'VariableDeclarator' &&
path.parentPath.parent.id.type === 'Identifier' &&
path.parentPath.parentPath.parent.type === 'VariableDeclaration' &&
path.parentPath.parentPath.parentPath.parent.type === 'Program';
const memberPropertyName = getMemberPropertyName(path.parent);
return !isValid ||
path.parentPath.parentPath.node == null ||
isExcludedMemberAssignment(moduleName, memberPropertyName, state)
? null
: {
declarationPath: path.parentPath.parentPath,
moduleName,
requireFnName,
};
}