Skip to content

[CLI] Rewrite aliases when compiling a folder #846

Open
@nmn

Description

It is common to use the @/ alias in Next.js. When using the CLI, the tsconfig is usually changed to update the alias to point to source instead of src.

Today, this means that any @/ import in the src/ folder will resolve to the uncompiled files in source and cause runtime errors.

We should rewrite aliases as part of the CLI to avoid dealing with this problem manually.

referece: #844

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions