Skip to content

Consider is aliasing paths for in-project and cross-project imports in tsconfig for brevity, in place of using relative "../../../modules" #342

@marcdumais-work

Description

@marcdumais-work

Original suggestion is by @aaanh and was made here


Hello, I think maybe something that we should consider is aliasing paths for in-project and cross-project imports in tsconfig for brevity, in place of using relative "../../../modules"

Note that it's important to prepend a symbol so that we avoid possible circular import issues

Before

// project_foo/module_foo.ts

import { SomeComponent } from "../../project_bar/module_bar"

After

// project_foo/module_foo.ts

import { SomeComponent } from "@project_bar/module_bar"

TS docs for reference:

An example of this can be found here:

Originally posted by @aaanh in #339 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions