The strategy, I think, would mean making use of importmaps for import statements. With that, I think that will provide compatibility for deno, node, bun, AND browsers.
I had already added the maps to deno.json; just need to change the import statements to use them.
And then, of course, ditch the dnt-based strategy., and use esbuild to compile the typescript code.
Testing can be handled via CI.
Here's a simple example with deno, bun, and node compatibility.
I think recent Deno enhancements should make this feasible.
See:
https://www.susanpotter.net/snippets/basic-deno-development-workflow-that-generates-node-artifacts/
The strategy, I think, would mean making use of importmaps for import statements. With that, I think that will provide compatibility for deno, node, bun, AND browsers.
I had already added the maps to
deno.json
; just need to change the import statements to use them.And then, of course, ditch the
dnt
-based strategy., and useesbuild
to compile the typescript code.Testing can be handled via CI.
Here's a simple example with deno, bun, and node compatibility.