Skip to content

Relative reference paths break the module system. #25

@ksheedlo

Description

@ksheedlo

I noticed that if you have a Typescript file that uses a reference path that is relative, the Typescript compiler will generate an output tree that is different from what typescript-require expects.

To reproduce, try creating two small modules in sibling subdirectories, src/foo.ts and test/bar.ts. Have test/bar.ts reference src/foo.ts using a relative reference path:

///<reference path="../src/foo.ts"/>

Importing test/bar.ts from a node script will fail because the resulting tmp directory created by tsc is not the same as what typescript-require internally expects it to be. See also my gist.

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