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: only enable minifyInternalExports by default when minify: true #878

Merged
merged 1 commit into from
May 14, 2024

Conversation

stipsan
Copy link
Member

@stipsan stipsan commented May 14, 2024

When debugging builds it's annoying when export identifiers are minified, even when minify isn't enabled (it requires minify: true in the package.config.ts):

Export "P" of module "node_modules/sanity/lib/_chunks-es/StructureToolProvider.mjs" was reexported through module "node_modules/sanity/lib/structure.mjs" while both modules are dependencies of each other and will end up in different chunks by current Rollup settings. This scenario is not well supported at the moment as it will produce a circular dependency between chunks and will likely lead to broken execution order.

P? What's P? Now I have to open the build file to figure out what that is. This PR turns off the underlying rollup feature that is causing export identifiers to be minified in internal code 😌

Verified

This commit was signed with the committer’s verified signature.
stipsan Cody Olsen
@stipsan stipsan requested a review from christianhg May 14, 2024 19:34
@stipsan stipsan requested a review from a team as a code owner May 14, 2024 19:34
@stipsan stipsan enabled auto-merge (squash) May 14, 2024 19:34
Copy link
Member

@christianhg christianhg left a comment

Choose a reason for hiding this comment

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

Looks like a reasonable change!

@stipsan stipsan merged commit ee50f48 into main May 14, 2024
9 checks passed
@stipsan stipsan deleted the stable-esm-exports branch May 14, 2024 19:37
@ecospark ecospark bot mentioned this pull request May 14, 2024
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