gabotechs / dep-tree

Tool for helping developers keep their code bases clean and decoupled. It allows visualising a code base complexity using a 3d force-directed graph of files and the dependencies between them.
https://github.com/gabotechs/dep-tree
MIT License
1.4k stars 35 forks source link

Support node subpath imports #71

Open soulofmischief opened 5 months ago

soulofmischief commented 5 months ago

The imports field in package.json is ignored.

Example:

"imports": {
    "#Assets/*": "./src/assets/*",
    "#Config": "./src/config.js",
    "#Lib": "./src/lib/index.js",
    "#Lib/*": "./src/lib/*",
    "#Models": "./src/models/index.js",
    "#Models/*": "./src/models/*",
    "#Styles/*": "./src/styles/*"
  }

Translating my imports map into tsconfig.json paths works as expected.

More information: https://nodejs.org/api/packages.html#subpath-imports

gabotechs commented 5 months ago

package.json imports are not currently supported, but they definitely should, I can take this.