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

Fix sequential expressions #43

Merged
merged 2 commits into from
Oct 16, 2022

Conversation

tornqvist
Copy link
Contributor

Handle sequential expressions with values other than functions and class expressions.

Input

exports.a={},exports.b='hello'

Output

// Before
/* common-shake removed: exports.a = */ {},/* common-shake removed: exports.b = */ 'hello'

// After
/* common-shake removed: exports.a = */ void {},/* common-shake removed: exports.b = */ void 'hello'

Handle values other than functions and class expressions
@goto-bus-stop goto-bus-stop merged commit f80ef52 into browserify:master Oct 16, 2022
@tornqvist tornqvist deleted the fix-sequential-expressions branch October 16, 2022 10:59
@goto-bus-stop
Copy link
Member

📦 1.1.2
thanks 😊

@tornqvist
Copy link
Contributor Author

I just noticed that this change completely breaks split-require. Only module.exports = whatever work but all named exports are dropped. I'm currently trying to create a test case to recreate it but am struggling as the test/comment/app.js does just the thing that is now broken, only that it's using require and not split-require.

I'm not fully familiar with the inner workings of split-require and even less so in combination with common-shakeify, @goto-bus-stop, can you see why this change would break split-require?

@tornqvist tornqvist mentioned this pull request Nov 9, 2022
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.

None yet

2 participants