uc.manuel_38211
Writing and sharing libraries locally
I have been working the last days with deno. I wrote a library that I wanted to use in other local deno project. I found no way whatsoever to be able to use the library directly. The library depends on npm packages. The only feasible way was to port it to npm using dnt. Good so far, if I import the generated npm package in another npm project all works fine. However, if I install such package in the deno project, no types are solved. And yes, I configured the package.json exports with types definitions, nothing worked and in VSCode I kept having imports from that package as "any".
Finally I tried referencing the files from the library with filesystem paths but this lead to other problems, so is a no go. There should be a simple support for developing local libraries, hanlding deps from libs in importer projects out of the box, just like a maven project. Anyone has achieved a similar flow?
Unfortunately this complications have led to stick with node+npm, and it is a shame because I was enjoying deno.
PD: VSCode plugin needs a lot of work still.
3 replies