You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I followed the documentation for Deno workspaces here, but found that it's not very clear on how a Deno project "sees" its sibling projects to be able to import them. From my understanding, if I run a project A in a workspace that also has project B, which A imports, Deno will first look in the parent directory of the project A directory, see if there is a root deno.json file there with a workspace property, then check the projects that workspace contains, and then, seeing that there is project B specified in the workspace array, will check if project B has a deno.json file, and then will import it successfully. This means that if we are to create a Docker container for project A, we must also copy project B and the root deno.json file to it. However, these are all just my assumptions, and it would be good if all of this was clearer from the documentation.
The text was updated successfully, but these errors were encountered:
@marvinhagemeister I also have another question: is it best to keep all projects in a single Deno workspace in the same Docker container? I'm now thinking that might be best, given how interconnected things become and that the alternative requires copying the shared project(s) and the root deno.json into each container separately.
I followed the documentation for Deno workspaces here, but found that it's not very clear on how a Deno project "sees" its sibling projects to be able to import them. From my understanding, if I run a project A in a workspace that also has project B, which A imports, Deno will first look in the parent directory of the project A directory, see if there is a root
deno.json
file there with aworkspace
property, then check the projects that workspace contains, and then, seeing that there is project B specified in theworkspace
array, will check if project B has adeno.json
file, and then will import it successfully. This means that if we are to create a Docker container for project A, we must also copy project B and the root deno.json file to it. However, these are all just my assumptions, and it would be good if all of this was clearer from the documentation.The text was updated successfully, but these errors were encountered: