Skip to content

import in referenced typescript project fail to load #96

Open
@steabert

Description

@steabert

Bug description

When working with composite projects, our tests failed because it seems that tsx is not taking the reference project's baseUrl or path into consideration.

Reproduction

Test project:

https://github.com/steabert/esbuild-kit-tsx-composite.git

To reproduce the issue:

yarn install
yarn fail

Running yarn bundle and yarn types shows the result with e.g. esbuild or tsc.

It seems this does not work with ts-node either, but I don't know how they handle composite typescript projects.

Environment

npx envinfo --system --npmPackages tsx --binaries
System:
  OS: Linux 5.4 Ubuntu 20.04.4 LTS (Focal Fossa)
  CPU: (8) x64 Intel(R) Core(TM) i5-8250U CPU @ 1.60GHz
  Memory: 23.58 GB / 31.21 GB
  Container: Yes
  Shell: 5.0.17 - /bin/bash
Binaries:
  Node: 16.14.2 - ~/.node/bin/node
  Yarn: 3.2.3 - ~/.npm-global/bin/yarn
  npm: 8.5.0 - ~/.node/bin/npm
npmPackages:
  tsx: 3.9.0 => 3.9.0

Can you contribute a fix?

  • I’m interested in opening a pull request for this issue.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions