Skip to content

fix: disable transitive imports hoisting #29

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

Merged
merged 1 commit into from
Jan 2, 2023

Conversation

stipsan
Copy link
Member

@stipsan stipsan commented Dec 24, 2022

As packages consumed by pkg-utils are typically consumed by other bundlers this optimization is a bit counter-intuitive.

For example look at: https://unpkg.com/browse/next-sanity@3.1.8/dist/studio/index.js
And line 17-18:

import '@sanity/icons';
import '@sanity/ui';

This happens because the file that uses @sanity/icons and @sanity/ui is NextStudioLoading. And NextStudioLoading is used by dist/studio/index.js and dist/studio/loading.js.

More info.

Partially verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
We cannot verify signatures from co-authors, and some of the co-authors attributed to this commit require their commits to be signed.
@stipsan stipsan force-pushed the fix-disable-transitive-imports-hoisting branch from 3635032 to 435c3d2 Compare December 30, 2022 22:57
Copy link
Member

@mariuslundgard mariuslundgard left a comment

Choose a reason for hiding this comment

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

Yay, you figured it out!

@stipsan stipsan merged commit ad1f22a into main Jan 2, 2023
@stipsan stipsan deleted the fix-disable-transitive-imports-hoisting branch January 2, 2023 09:47
@github-actions
Copy link
Contributor

github-actions bot commented Jan 2, 2023

🎉 This PR is included in version 2.0.6 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants