Read dependency directory
Is it possible for a library to read its own non-importable files?
I'm publishing some static files in a library. I'd like for that library to copy the files wherever the user wants. Is there a way without transforming those files into importable JSON or JS files?
Library:
This works great inside the library. However, outside it will error:
2 Replies
I think it's only possible with
fetch
fetch
is a dirty workaround that requires enumerating all the files in the directory and being online. Using NPM to host the library and "nodeModulesDir": "auto"
works. However, I've now run into another issue:
I hate to say this, but this is the straw that broke my back. I've had a lot of module interop problems (even on the ESM + JSR happy path...). I'm moving all my packages off Deno and JSR.