I noticed that when moving files (specifically CSS files in my case) to different directories, the import paths in other files don’t automatically update to reflect the new location. In VSCode, this is handled by the javascript.updateImportsOnFileMove.enabled
setting.
Steps to reproduce:
- Have a CSS file imported in a JavaScript/React project
- Drag the CSS file to a different directory in the file explorer
- The import paths remain unchanged in files that import this css file, requiring manual updates
Expected behavior:
- When moving a file, all imports referencing that file should automatically update to reflect the new path
- Alternatively, prompt the user to update imports when a file is moved
How do I enable this feature?
Is this feature planned for Cursor? It would be a great quality-of-life improvement for refactoring code.
Environment:
- Cursor Version: 0.43.6
- VSCode Version: 1.93.1
- OS: ubuntu ec2 instance via remote ssh
- Project type: React