New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
5to6-codemod/transforms/exports.js can't handle variable exports case #48
Comments
Hi @faywong, I've cobbled together a fix for this in this branch; let me know if this works for you. |
Hi @faywong, have you had the chance to try the branch with the fix yet? |
The result I received: var exports = {
'testkey': 'testvalue'
};
export default exports;
// 导出错误类型码
Object.keys(constants).forEach(function (key) {
if (key.indexOf('ERR_') === 0) {
exports[key] = constants[key]; // this line will be converted wrong
}
}); Seems to have fixed it 👍 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
will be converted to
The text was updated successfully, but these errors were encountered: