Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
references[referenceKey].reverse().forEach(reference => {
const path = reference.parentPath
reference.replaceWith(t.cloneDeep(runtimeNode))
// add pure function annotation
// so that consumers can remove console statements from prod bundles
if (process.env.NODE_ENV === 'production') {
path.traverse({
Function: annotateAsPure
})
annotateAsPure(reference)
annotateAsPure(path)
}
})
})
references[referenceKey].reverse().forEach(reference => {
const path = reference.parentPath
reference.replaceWith(t.cloneDeep(runtimeNode))
// add pure function annotation
// so that consumers can remove console statements from prod bundles
if (process.env.NODE_ENV === 'production') {
path.traverse({
Function: annotateAsPure
})
annotateAsPure(reference)
annotateAsPure(path)
}
})
})
state.singleSourceOfVariables[variableName] || fallback
);
}
transformCsstaTypes[csstaType](
babel,
path,
state,
component,
cssText,
substitutionMap
);
const binding = path.scope.getBinding(callee.name);
binding.dereference();
annotateAsPure(path);
};