Open mayeaux opened 7 years ago
Btw, I was able to fix this via:
+const to = process.argv[2];
+const subject = process.argv[3];
+const text = process.argv[4];
Loading the variables into memory first, and then using those variables. Not sure how to make this not throw in babel-rewire though
@mrmayfield Thanks for reporting this issue and sorry for the late reply. The issue will be tackled, but won't be fixed before mid of march.
@mikesherov I got the same error with a salesforce lwc module :
function isRewireable(path, variableBinding) {
var node = path.node,
parent = path.parent;
return variableBinding.referencePaths !== null &&
!(parent.type === 'VariableDeclarator' && parent.id == node) &&
!(parent.type === 'ForInStatement' && parent.left == node) &&
✅ !(parent.type === 'AssignmentExpression' && parent.left == node) &&
!(parent.type === 'FunctionExpression' && parent.id === node) &&
!(parent.type === 'MemberExpression' && parent.property === node) &&
[...]
}
Adding this line at src/babel-plugin-rewire.js
among the return conditions of the function isRewireable
fixed the error !
During transpilation I receive this error:
With this file:
Any ideas?