Open CheatCod opened 1 year ago
deno_runtime::WorkerOptions has a field: pub npm_resolver: Option<Arc<dyn deno_node::NpmResolver>>, which is default initialized to None.
deno_runtime::WorkerOptions
pub npm_resolver: Option<Arc<dyn deno_node::NpmResolver>>,
None
If we provide it with an implementation of npm_resolver, we should be able to npm package support.
npm_resolver
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
https://deno.land/x/deno@v1.35.2/cli/module_loader.rs prob need to change the module loader as well
deno_runtime::WorkerOptions
has a field:pub npm_resolver: Option<Arc<dyn deno_node::NpmResolver>>,
which is default initialized toNone
.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