Skip to content

Moving files or folders in a monorepo setup does not adapt imports #59136

Open
@Hademumel

Description

Does this issue occur when all extensions are disabled?: Yes

  • VS Code Version: 1.90.0
  • OS Version: Installed in Windows 10, Working in WSL 2 (Ubuntu 22.04)

Steps to Reproduce:

  1. Create a monorepo setup that uses npm workspaces and typescript project references.
  2. Create imports across workspace packages, e.g. import from @packageName.
  3. Move a file or a folder that gets imported in various packages.

Result: Not all imports get adapted, you have to correct them manually. Especially imports in packages that are not involved in the move (other than source or target package) do not get adapted.

Expectation: All imports that reference the moved file or folder should get adapted automatically.

I really love VS Code but move refactorings are not really supported at the moment. IMHO this is a basic feature for a code editor and should also be supported for monorepo setups. I know several colleagues that moved away from VSCode to Webstorm for this reason.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    BugA bug in TypeScriptHelp WantedYou can do this

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions