Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Subpath imports not working #11

Open
TimonVS opened this issue Jan 15, 2024 · 1 comment
Open

Subpath imports not working #11

TimonVS opened this issue Jan 15, 2024 · 1 comment

Comments

@TimonVS
Copy link

TimonVS commented Jan 15, 2024

Subpath imports using the "imports" field in package.json results in an error like:

Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/Users/timon.vanspronsen/Code/tsimp-imports/src/utils/math.js'

I've created a reproduction repository here: https://github.com/TimonVS/tsimp-imports. I've tried with both Node.js 18 and 20.

ajvincent added a commit to ajvincent/tsimp that referenced this issue Jun 16, 2024
@ajvincent
Copy link

ajvincent commented Jun 16, 2024

#23 might fix this.

Edit: Maybe not. I wrote my fix for subpath imports in the following style, which the reproduction repository didn't follow.

  "imports": {
    "#utilities/*": "./utilities/*"
  }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants