Reputation: 2046
Recently there was an upgrade in WebStorm (I think) and it changed how paths were imported in my files. Previously, if I typed @Component
and allow WebStorm to automatically import the path, it would use this form:
import { Component } from @angular/core
But recently it has started pulling in the full paths instead:
import { Component } from '@angular/core/src/metadata/directives';
Is there a configuration change I can make to address this?
[EDIT] I discovered that if I copy and paste code into a file, it will import the dependencies properly. This feels like a bug that my particular configuration is revealing.
It appears that the only libraries that do this are Angular libraries, so I suspect the problem is with the Angular plugin. I have reached out to JetBrains and they have no answers.
Upvotes: 1
Views: 1064
Reputation: 2046
And like that, one day, I log back in to discover the bug has been fixed. This appears to have been a problem with the Angular Plugin as imports for other libraries worked properly. Things that I tried to fix this include:
None of the above did anything. I would love if someone from JetBrains would help me understand how to better help them understand bugs I find.
This isn't exactly a fix for the bug, but if anyone else discovers this happening in their code, hopefully, this will help them debug.
Upvotes: 2