-
Notifications
You must be signed in to change notification settings - Fork 18
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
Multiple assignment case #23
Conversation
prefix += 'void 0, ' | ||
// ignore alias assignment expression `exports.a = exports.b = exports.c` | ||
if (!( | ||
node.right.type === 'AssignmentExpression' && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The naive guess, possibly can be more general.
@@ -11,6 +11,6 @@ console.log(/* common-shake removed: exports.a = */ 'hello world') | |||
function a() {} /* common-shake removed: exports.b = */ void 0, function () { return a }, console.log(a) | |||
var c = (0, /* common-shake removed: exports.c = */ 'beep boop') | |||
|
|||
/* common-shake removed: exports.d = */ void 0, exports.e = null |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bonus side effect
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks solid. thanks!
📦 0.5.3 |
Fixes #22.
Tested out with huge bundle in audio-formant, seems to work ok now.
All tests pass, not sure what other edge cases there can be.
@goto-bus-stop