-
Notifications
You must be signed in to change notification settings - Fork 44
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
Not all imports in TypeScript are detected. #102
Comments
I just see the pull request #100, which is proberly the solution for this bug. |
@ThierryRietveld I don't think #100 is related. I believe your problem is this default value: https://github.com/dependents/node-filing-cabinet/blob/master/index.js#L219-L222:
AMD module resolution will not look for Try setting this in your tsconfig.json: {
"compilerOptions": {
"module": "CommonJS"
}
} CommonJS is normally the default value provided by typescript itself. It's unfortunate that filing-cabinet provides a different default. |
Any PRs to improve things are welcome, along with accompanied tests. |
Actually, in v4.0.0 I removed that code so the TypeScript default will be used. |
I'm using dependency-tree to get a tree of my TypeScript project, but it does not show all imported files. When an import statement directs to a folder with an index file, it will not detect it. When I step through the call stack the problem is probably in the
tsLookup()
function in filing-cabinet.The line:
const namedModule = ts.resolveModuleName(dependency, filename, compilerOptions, host);
does not resolve in a module. am I doing something wrong, or is this a bug?When I change the files to .js everything works as expected.
Example
File Structure
main.ts
index.ts
Output
Desired output
Config dependency-tree
The text was updated successfully, but these errors were encountered: