I need help creating a custom annotation for imports in my project. Essentially, I want to be able to define an annotation that will automatically direct me to a specific folder within my project directory no matter where I am located. For example:
import { SomeComponent } from '@app/components/some.component';
In the above code snippet, @app
takes me to the src/app
folder. Now, I want to create a similar annotation like @bar
that would take me to the "bar" folder irrespective of my location within the project structure.
So, ideally, I would like to use something like this:
import { MyFile } from '@bar/myfile';
If anyone can guide me on how to achieve this, I would greatly appreciate it. Thank you!