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

Add npm package support #163

Open
CheatCod opened this issue Jun 10, 2023 · 1 comment
Open

Add npm package support #163

CheatCod opened this issue Jun 10, 2023 · 1 comment

Comments

@CheatCod
Copy link
Member

CheatCod commented Jun 10, 2023

deno_runtime::WorkerOptions has a field:
pub npm_resolver: Option<Arc<dyn deno_node::NpmResolver>>, which is default initialized to None.

If we provide it with an implementation of npm_resolver, we should be able to npm package support.

See more: https://github.com/denoland/deno/blob/main/cli/npm/resolvers/mod.rs.

Note this may be a deep rabbit hole, expect to spend hours on this

@CheatCod
Copy link
Member Author

https://deno.land/x/deno@v1.35.2/cli/module_loader.rs prob need to change the module loader as well

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

1 participant