DenoDDeno
Powered by
i_use_arch_btwI
Denoβ€’12mo agoβ€’
3 replies
i_use_arch_btw

Workspace-aware path imports

Hi!

My use case: I want to import a package from a Deno workspace. It doesn't work:

- Simply specifying path to the package root or its
deno.jsonc
deno.jsonc
doesn't work
- Consequently, Deno isn't aware of package's
exports
exports
and, more importantly,
imports
imports


I am using the same mental model that works with Cargo: just specify the path, and Cargo will resolve everything.

[dependencies]
some_package = { path = "../../workspace_a/packages/some_package" }
[dependencies]
some_package = { path = "../../workspace_a/packages/some_package" }


Cargo understands that this is a crate, and it is a part of a workspace, and Cargo will resolve this crate's dependencies and everything accordingly.

I would really like if it works in Deno the same way.

Or is there a way to achieve the same right now?
Deno banner
DenoJoin
Chat about Deno, a modern runtime for JavaScript and TypeScript.
20,944Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Need help making fresh, rutt and preact base path aware
N!NZBRETTNN!NZBRETT / help
4y ago
About imports
drom765Ddrom765 / help
2y ago
Deno Imports
stephenSstephen / help
3y ago
using imports map to map no-suffix imports to suffix imports
andyAandy / help
3y ago