dependents / node-dependency-tree

Get the dependency tree of a module

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Node package.json exports field not understood.

RobertSandiford opened this issue · comments

Hi

I am importing from a node_modules package that uses the exports field to redirect to /dist

"exports": {
    "./*": "./dist/*"
}

However these dependencies are not found and show up in the nonExistent array.

const nonExistent = []
const dependencies = dependencyTree.toList({
    filename: filePathFull,
    directory: process.cwd(),
    nonExistent,
})

I have checked moving the imported files to the root of the package, and it does then find them - so it seems that the exports field is not understood.

I may be willing to work on this, if it's not a simple fix. Would it be a filing-cabinet issue?

Thanks