Alex
Alex

Reputation: 433

Change imports on aliases in all project

I have added aliases for import statements in my Angular project. Now, I'd want to apply these aliases on all imports automatically, without changing imports manually.

WebStorm allows me to change it almost automatically one-by-one (see screenshot), but is there any way to do the same thing on all imports at once?

enter image description here

Upvotes: 2

Views: 1238

Answers (1)

lena
lena

Reputation: 93858

you can use Fix all 'Import can be shortened' problems in this file quick fix available on Alt+Enter, Right; To apply fix to all files in project, you can run Code > Inspect Code... for the whole project and then use the quick fix (Replace with a shorter path) in inspection results to fix all problems

enter image description here

Upvotes: 6

Related Questions