README.md
November 4, 2025 ยท View on GitHub
๐ Smart Path Alias Navigation for VS Code
English | ็ฎไฝไธญๆ
โจ Features
vscode-alias-jump is a powerful VS Code extension that provides intelligent path alias resolution and navigation. Say goodbye to broken Cmd+Click navigation when using path aliases like @/components/Button!
๐ฏ Core Capabilities
- ๐ Smart Alias Resolution - Automatically resolves path aliases from
tsconfig.json/jsconfig.json - โก๏ธ Multi-Format Support - Works with
import,require(),import(), HTMLsrc, and CSSurl() - ๐ Hot Reload - Auto-refreshes when config files change (no restart needed!)
- ๐ฆ Monorepo Ready - Per-document alias resolution for complex workspace structures
- ๐จ Multi-Language - Supports Vue, React, TypeScript, JavaScript, CSS, SCSS, Less
- ๐พ Smart Caching - Intelligent cache invalidation for optimal performance
- ๐ Multiple Paths - Detects and resolves multiple import paths in a single line
- ๐ฏ Precise Navigation - Click exactly on the path you want to navigate to
- โก๏ธ Async I/O - Non-blocking file resolution for smooth editing experience
๐ Why Choose This Over Others?
Unlike other alias extensions that only work at the root level, vscode-alias-jump:
- โ Resolves aliases per-document (perfect for monorepos)
- โ
Supports
tsconfigreferences and project references - โ Handles multiple alias candidates with priority order
- โ
Auto-detects and strips query strings (
?raw) and hash fragments - โ Uses async I/O to avoid blocking the editor
- โ Provides retry mechanism for reliability
๐ฆ Installation
- Open VS Code
- Press
Ctrl+P/Cmd+P - Type
ext install simonhe.vscode-alias-jump - Press Enter
Or search for "vscode-alias-jump" in the Extensions view.
๐ Quick Start
1. Configure Your Project
Add path aliases to your tsconfig.json or jsconfig.json:
{
"compilerOptions": {
"baseUrl": ".",
"paths": {
"@/*": ["src/*"],
"~/*": ["src/*"],
"#components/*": ["src/components/*"],
"#utils/*": ["src/utils/*"]
}
}
}
2. Start Using!
The extension works automatically once activated. Just Cmd+Click (macOS) or Ctrl+Click (Windows/Linux) on any aliased import:
// โ
All of these work!
import Button from '@/components/Button'
import { helper } from '~/utils/helper'
const Icon = () => import('#components/Icon')
require('@/config/constants')
// โ
CSS/SCSS too!
@import '@/styles/variables.scss';
background: url('~/assets/logo.png');
// โ
HTML/Vue templates
<img src="@/assets/image.png" />
๏ฟฝ Supported File Types
| Language | Extension | Support |
|---|---|---|
| Vue | .vue | โ |
| TypeScript | .ts | โ |
| JavaScript | .js | โ |
| React (JSX) | .jsx | โ |
| React (TSX) | .tsx | โ |
| CSS | .css | โ |
| SCSS | .scss | โ |
| Less | .less | โ |
๐ฅ Advanced Features
Multiple Alias Candidates
If your paths config has multiple candidates, the extension will try them in order:
{
"compilerOptions": {
"paths": {
"@/*": ["src/*", "lib/*", "packages/*/src/*"]
}
}
}
TypeScript Project References
The extension automatically follows tsconfig references:
{
"references": [
{ "path": "./packages/core" },
{ "path": "./packages/utils" }
]
}
Monorepo Support
Each file uses its nearest tsconfig.json / jsconfig.json, making it perfect for monorepos with multiple packages!
Auto-Reload on Config Changes
When you update tsconfig.json or jsconfig.json, the extension automatically:
- ๐ Invalidates cached aliases
- ๐ Reloads the configuration
- ๐งน Clears outdated navigation cache
No manual restart required!
โ๏ธ How It Works
- Discovery - Finds the nearest
tsconfig.json/jsconfig.jsonfor each file - Parsing - Extracts
compilerOptions.pathsand merges from references - Resolution - Resolves aliases with support for multiple candidates
- Navigation - Provides
Cmd+Clicklinks andF12"Go to Definition" - Caching - Intelligently caches results with document-level granularity
๐ Troubleshooting
Aliases not working?
- โ
Check that you have a
tsconfig.jsonorjsconfig.jsonin your workspace - โ
Verify the
pathsconfiguration is correct - โ Make sure the target files exist
- โ
Try reloading VS Code window (
Cmd+R/Ctrl+R)
Navigation goes to wrong file?
- Check if you have multiple alias candidates - the first match wins
- Verify your
baseUrlis set correctly in the config
๐ค Contributing
Issues and pull requests are welcome!
- Fork the repository
- Create your feature branch (
git checkout -b feat/amazing-feature) - Commit your changes (
git commit -m 'feat: add amazing feature') - Push to the branch (
git push origin feat/amazing-feature) - Open a Pull Request
๐ฑ Inspiration
This project is inspired by alias-skip and enhanced with many powerful features for modern development workflows.
๐ Sponsor
If this extension helps you, consider buying me a coffee! โ
๐ License
Made with โค๏ธ by Simon He