Skip to content

Fix sequential expressions#43

Merged
goto-bus-stop merged 2 commits into
browserify:masterfrom
tornqvist:fix-sequential-expressions
Oct 16, 2022
Merged

Fix sequential expressions#43
goto-bus-stop merged 2 commits into
browserify:masterfrom
tornqvist:fix-sequential-expressions

Conversation

@tornqvist
Copy link
Copy Markdown
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
Copy Markdown
Member

📦 1.1.2
thanks 😊

@tornqvist
Copy link
Copy Markdown
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?

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