tapjs/tsimp

Subpath imports not working

Opened this issue · 1 comments

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.

#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/*"
  }