Why aren't you using Aliases in webpack config?
Are you Developer doing FrontEnd? Are you using Webpack?
If any answer is No, you can skip this post.
But if Yes, are you using aliases in your webpack configuration?
If Yes, you can leave this page.
If No, then let me ask you a question:
Why not?...
blog.pankaj.pro
I don't use Webpack Aliases. Even common-used like
@forsrc.I don't think about import. Moreover, I usually don't even touch them. How? I'm using modern IDE. Apps like JetBrains WebStorm, IntellijI IDEA etc have perfect auto-imports.
Not all IDE and not always works perfect with aliases. For example, known bug with resolving alias in project from Yarn Workspace: youtrack.jetbrains.com/issue/WEB-39641
Agreements. I think, if it's not commonly used alias (like
@forsrc), the code could be too unobvious, unclear with such aliases... It'd unnecessary agreements.Today it's an application. Tomorrow we want co make a library from a part of code. Won't aliases make our code less reusable?
Maybe we just need to make project structure simpler, less deep?