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

test(compartment-mapper): Add failing test for 1:* exports #727

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kriskowal
Copy link
Member

Per #716 (comment), bundles do not yet support exporting a local variable by multiple names on the module exports namespace.

This will require a somewhat bold but manageable change to the structure of the bundle. I believe we can actually flatten the array of cells, giving every local variable of every module in the working set a unique index, then reusing the same cell for multiple properties of the module namespace object.

This will require more book-keeping up front, building out an index of the cells, but should actually have a nice effect on bundle size since the cells declaration can look more like:

const cells = new Array(length).fill().map(cell);

It will probably not be practical any longer to name the cells, since the names are not intrinsic to the cell, at a minor cost to the debug experience.

@kriskowal kriskowal self-assigned this May 13, 2021
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.

1 participant