Skip to content
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

Merged
merged 4 commits into from
Jan 15, 2019
Merged

Multiple assignment case #23

merged 4 commits into from
Jan 15, 2019

Conversation

dy
Copy link
Contributor

@dy dy commented Jan 11, 2019

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

prefix += 'void 0, '
// ignore alias assignment expression `exports.a = exports.b = exports.c`
if (!(
node.right.type === 'AssignmentExpression' &&
Copy link
Contributor Author

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
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bonus side effect

test/test.js Show resolved Hide resolved
@goto-bus-stop goto-bus-stop self-requested a review January 12, 2019 18:25
Copy link
Member

@goto-bus-stop goto-bus-stop left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks solid. thanks!

@goto-bus-stop goto-bus-stop merged commit 4c21678 into browserify:master Jan 15, 2019
@goto-bus-stop
Copy link
Member

📦 0.5.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants