Automatically corrects import statements when Vue 3 components are moved within your project.
Features
Automatic Import Correction: Updates import statements when you move .vue component files.
Supports Various Import Styles: Handles static imports, dynamic imports, and require statements.
Path Aliases Handling: Recognizes and updates import paths using your project's path aliases.
Performance Optimizations: Debounced file system watching and caching for efficient operation.
Installation
Install the extension from the VSCode Marketplace (link to be provided after publishing).
Alternatively, install from a .vsix file:
Download the latest .vsix file from the Releases page.
In VSCode, go to Extensions panel.
Click on the More Actions button (three dots) and select Install from VSIX....
Usage
Automatic Operation: The extension runs automatically when you move .vue component files within resources/js/.
Configuration: You can configure path aliases in your VSCode settings.
Configuration Options
In your VSCode settings.json, you can add:
{
"vue3ImportAutoCorrect.aliases": {
"@": "resources/js"
}
}
## Requirements
- **Visual Studio Code** version 1.XX.X or higher.
- A Vue 3 project with components located in `resources/js/`.
## Extension Settings
This extension contributes the following settings:
- `vue3ImportAutoCorrect.aliases`: Define path aliases used in your project. Default is `{ "@": "resources/js" }`.
## Known Issues
- May not detect import statements in uncommon formats.
- Limited to projects where components are within `resources/js/`.
## Release Notes
### 0.0.1
- Initial release of Vue 3 Import Statement Auto-Correct.