moodring
Local Deno package imports: Use package's deno.json config "exports" map?
Though, for anyone else following along (or finding this down the line): Workspaces apparently require package names to be formatted as
@[namespace]/[package]
, which was unclear (to me). Building "workspace a" with the "patch"
definition (apparently) doesn't alert to warnings in "workspace b" (the patch target workspace). Building the patched workspace directly does provide warning feedback, but before doing so I found myself looking for documentation explaining other unclear error messages about missing exports.12 replies
Local Deno package imports: Use package's deno.json config "exports" map?
Seems this works great for projects within the same workspace.
An aside: I have a similar use-case, importing packages from a local directory which is adjacent to the root workspace; i.e., two workspaces next to each other, where
workspace-a
imports workspace-b
.
As local directory imports aren't supported, I'm just referencing the necessary modules directly in the workspace-a
import map. Is this the recommended way to do things?12 replies
Local Deno package imports: Use package's deno.json config "exports" map?
Note: I'm seeing that I might be able to just reference a singular export path and then reference that file directly in the imports, but I'd prefer to keep my existing exports structure (if possible). I also wonder about other unintended side-effects related to bypassing the package level configs.
12 replies