Skip to content

Allow to Rename Files #11482

@giovannibenussi

Description

@giovannibenussi

It's common to rename files while working on a project:

  • Rename files from .js to .ts (and .jsx to .tsx) when migrating gradually to TypeScript.
  • Move a main function.js file to function/index.js when its complexity grows or a proper structure is needed.

However, as soon as you rename a file, you see the following error in development:

Failed to compile.

./src/test.js
Error: ENOENT: no such file or directory, open '/Users/my-user/test-project/src/test.js'

At this point, the only solution is to restart the development environment which takes time on some projects so it's not ideal.

Proposed solution

If renaming a file results in the same resolved file for the compiler, it should be handled automatically.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions