ionic-team / vscode-ionic

Visual Studio Code Ionic Extension
Other
10 stars 1 forks source link

1.93.2 #188

Closed dtarnawsky closed 3 weeks ago

dtarnawsky commented 3 weeks ago
lollomrt commented 3 weeks ago

Thank you for the recent fix in the pull request! However, I've noticed that the issue with duplicate import statements for IonIcons still persists. Here’s what happens:

  1. After saving an HTML file, the following import statements are added:
    
    import { addIcons } from "ionicons";
    import { chatbubbleEllipsesOutline } from "ionicons/icons";
    import { mapOutline } from "ionicons/icons";
    import { reorderTwo } from "ionicons/icons";
    import { print } from "ionicons/icons";
    import { pencil } from "ionicons/icons";

addIcons({ chatbubbleEllipsesOutline, mapOutline, reorderTwo, print, pencil });

2. Upon saving the HTML file again, the TypeScript file ends up with duplicate import statements like:

import { addIcons } from "ionicons"; import { chatbubbleEllipsesOutline, mapOutline, reorderTwo, print, pencil } from "ionicons/icons"; import { mapOutline } from "ionicons/icons"; import { reorderTwo } from "ionicons/icons"; import { print } from "ionicons/icons"; import { pencil } from "ionicons/icons";


Could you please look into it again?
Thanks again for your hard work on this!

VsCode version: 1.90.0
Angular version: 17.3.9
Ionic Extension version: 1.93.3
dtarnawsky commented 3 weeks ago

Super interesting, having an import line for each icon isn't really expected. I'll see if I can either write an import cleanup, or look at all the imports before adding one......

lollomrt commented 3 weeks ago

Perfect! I look forward to any further updates. Thanks for the work you are doing.