-
Notifications
You must be signed in to change notification settings - Fork 171
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(editor): don't create a duplicate import for aliased files (#6062)
**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
- Loading branch information
Showing
3 changed files
with
24 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters