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

Is it possible to resolve node_modules? #1617

Open
dherault opened this issue Feb 24, 2025 · 1 comment
Open

Is it possible to resolve node_modules? #1617

dherault opened this issue Feb 24, 2025 · 1 comment

Comments

@dherault
Copy link

Hi,

I have a project where I need to determine whether the module fs is imported into a codebase. This must include the node_modules too.
So far I've been using addSourceFileAtPath with the codebase's entry and the dependencies resolved entries.

But as far as I can tell resolveSourceFileDependencies does not resolve the node_modules' imports.

Do you know how I can resolve the full codebase?

@dsherret
Copy link
Owner

I think project.getAmbientModule("fs") or project.getAmbientModule("node:fs")

getAmbientModules(): Symbol[];

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