Skip to content

Transpiling a project from another directory will incorrectly resolve require paths #751

@Perryvw

Description

@Perryvw

i.e running having a directory 'project' with tsconfig and file:

import * as foo from "./bar/baz";

And then running transpileProject("project/tsconfig.json") from the parent directory (of the project dir), will result in require("project.bar.baz") because Emit falls back on process.cwd() instead of the project (tsconfig) dir: https://github.com/TypeScriptToLua/TypeScriptToLua/blob/master/src/Emit.ts#L24

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions