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: recursive alias imports #1046

Merged
merged 1 commit into from
Feb 12, 2025
Merged

Conversation

maiieul
Copy link
Contributor

@maiieul maiieul commented Feb 12, 2025

What is it?

  • Feature / enhancement
  • Bug
  • Docs / tests
  • Other

Why is it needed?

cc @thejackshelton we need to avoid importing from e.g. @qwik-ui/headless inside the headless package itself, otherwise the optimizer adds unrelated imports to a component when building the lib, which leads to over-prefetching to consumers of that lib.

image
Here the toggle-group-item imports a lot of components from Accordion and Dropdown (because it's an MRE and there's only Accordion, Dropdown, Toggle and ToggleGroup). This will lead to over-prefetching.

Checklist:

  • My code follows the developer guidelines of this project
  • I have performed a self-review of my own code
  • I have ran pnpm change and documented my changes
  • I have add necessary docs (if needed)
  • Added new tests to cover the fix / functionality

Copy link

changeset-bot bot commented Feb 12, 2025

⚠️ No Changeset found

Latest commit: a387622

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

Copy link

pkg-pr-new bot commented Feb 12, 2025

Open in Stackblitz

npm i https://pkg.pr.new/qwikifiers/qwik-ui@1046
npm i https://pkg.pr.new/qwikifiers/qwik-ui/@qwik-ui/styled@1046
npm i https://pkg.pr.new/qwikifiers/qwik-ui/@qwik-ui/headless@1046
npm i https://pkg.pr.new/qwikifiers/qwik-ui/@qwik-ui/utils@1046

commit: a387622

@maiieul maiieul merged commit 8c07955 into qwikifiers:main Feb 12, 2025
6 checks passed
@thejackshelton
Copy link
Collaborator

Thanks for catching that! Yes this is not intended.

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