Fix problems with moving files in vscode.
vsc-move take control of all imports.
Forces import paths to be absolute from rootPath except files/folders in same folder or subfolder. import ref to file in the same folder and subfolders will start './' All other ref will be from rootPath and will have no prefix (Not even '/')
So if that is not what you want, then dont use this extension!
Project Absolute path
You need to set absolute path in your project.
For typescript projects:
For create-react-app projects:
Default value is '/src'
Comma seperated list of file extansions that vsc-move will handle. vsc-move will update all import in these files.
Default value is 'css,scss,ts,tsx,js,jsx'
vscMove will ignore all import paths that matches this excludePattern.
If the project has files that uses imports from outside the rootPath, vscMove will update the import to full system parth.
To avoid this you can add the excludePattern.
EX: If you use storybook library and have your stories inside the the rootPath but need to import configs from outside the rootPath, you can exclude this with an regexp like this: ^.*\/\.storybook\/ (This will ignore all import includes '/.storybook/' )
Some project works with absolute path prefix like '@'. This can also be fix in future version.
All path to file in the same folder or sub folder will get relative path starting with './' Its not all project that will use that convention. In the future this could maybe to set in a config property
vsc-move dont scan tsconfig files, and it dont know anything about other kins of path manipulation.
Links and related projects