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

Use the new preserveEntrySignatures option recommended for libraries #117

Merged
merged 3 commits into from Jun 21, 2023

Conversation

mrm007
Copy link
Collaborator

@mrm007 mrm007 commented Jun 21, 2023

Rollup 3.22.0 made a few improvements to the chunking algorithm, and there's a new setting preserveEntrySignatures which is perfect for libraries. All the details are in rollup/rollup#4989, but the TLDR is now we can specify that entry points don't add extra exports, and move those to a separate chunk.

From the docs:

If set to "strict", Rollup will create exactly the same exports in the entry chunk as there are in the corresponding entry module. If this is not possible because additional internal exports need to be added to a chunk, Rollup will instead create a "facade" entry chunk that reexports just the necessary bindings from other chunks but contains no code otherwise. This is the recommended setting for libraries.

This solves the problem in Braid where all internal and public exports were in /reset and every other entry re-exported from there.

@mrm007 mrm007 requested a review from a team as a code owner June 21, 2023 00:39
@mrm007 mrm007 temporarily deployed to snapshot June 21, 2023 00:39 — with GitHub Actions Inactive
@changeset-bot
Copy link

changeset-bot bot commented Jun 21, 2023

🦋 Changeset detected

Latest commit: 240969f

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@crackle/core Patch
@crackle/cli Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@mrm007 mrm007 merged commit 9956efa into master Jun 21, 2023
11 checks passed
@mrm007 mrm007 deleted the chunking branch June 21, 2023 03:41
@seek-oss-ci seek-oss-ci mentioned this pull request Jun 21, 2023
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