An alias is a way to create shortcuts for your imports.
Aliases can help improve the development experience in codebases with many directories or relative imports.
In this example, a developer would need to understand the tree relationship between
src/assets/logo.png. And then, if the
company.astro file were to be moved, these imports would also need to be updated.
You can add import aliases from either
With this change, you can now import using the aliases anywhere in your project:
These aliases are also integrated automatically into VS Code and other editors.