You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
Let spacers be spacers
No illegal re-imports
The text was updated successfully, but these errors were encountered:
**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
**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
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: