-
Notifications
You must be signed in to change notification settings - Fork 166
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
Import detection: Inserting the Spacer component and navigator-dragging it to reorder renames it to spacer_2 #5980
Comments
2 tasks
liady
added a commit
that referenced
this issue
Jul 11, 2024
**Problem:** Currently when trying to import the same component from an import source that is aliased in the file, we incorrectly recognize it as a different source and create a duplicate import **Fix:** Take the alias mapping into consideration. The heavy lifting was done in the previous prep PR which was to pass this mapping into the `mergeImports` function. **To reproduce/test:** In our sample store project, locate the `Grid` with the six `ProductCard`s, and try to move (simply move) one of the `ProductCard` inside that grid. It used to create a duplicate import. **Manual Tests:** I hereby swear that: - [X] I opened a hydrogen project and it loaded - [X] I could navigate to various routes in Preview mode Fixes #5980
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Problem
Inserting the Spacer component in sample project works fine. When you navigator-drag it to reorder it though it all behaves suboptimally and it gets re-imported as Spacer_2.
Solution
The text was updated successfully, but these errors were encountered: