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

[WIP] Only export user-requested symbols on the Module object. NFC #17389

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

sbc100
Copy link
Collaborator

@sbc100 sbc100 commented Jul 7, 2022

Some exports are only needed internally and those don't need to be
exported on the Module object. This is save some space and avoids
unexpected exports on the public-facing Module.

@sbc100 sbc100 changed the title Only export user-requests symbols on the Module object. NFC [WIP] Only export user-requests symbols on the Module object. NFC Jul 7, 2022
@sbc100
Copy link
Collaborator Author

sbc100 commented Jul 7, 2022

@kripken WDYT of this small optimization? Seems maybe worth it?

Copy link
Member

@kripken kripken left a comment

Choose a reason for hiding this comment

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

Makes sense to do I think!

I didn't read every line yet, but direction looks good. Please add acorn tests for the acorn changes.

if (!value) {
return;
}
let payload = value;
if (value && value.type === 'AssignmentExpression') {
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
if (value && value.type === 'AssignmentExpression') {
if (value.type === 'AssignmentExpression') {

Base automatically changed from remove_module_usage to main July 8, 2022 21:19
@sbc100 sbc100 changed the title [WIP] Only export user-requests symbols on the Module object. NFC [WIP] Only export user-requested symbols on the Module object. NFC Jul 8, 2022
Some exports are only needed internally and those don't need to be
exported on the Module object.  This is save some space and avoids
unexpected exports on the public-facing Module.
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