it's not possible to use import map in library as it cannot use import map. using deps.ts as a walkaround is possible but requires many manual work to manage properly. it would be very convenient to be able to transform
using import map, then the transpiled output could be released into registry without issues.
External Tool Limitations
bundle() strips away all type information, which makes it not possible to run tools relying on typescript AST. This could be problematic due to same reason as above (import map), and tsc cannot resolving deno's HTTP based imports.
Summary
I think it would be useful to
emit
to output typescript file with its import map resolvedbundle
to merge multiple typescript files into single typescript fileUse cases
Resolving import maps
it's not possible to use import map in library as it cannot use import map. using
deps.ts
as a walkaround is possible but requires many manual work to manage properly. it would be very convenient to be able to transforminto
using import map, then the transpiled output could be released into registry without issues.
External Tool Limitations
bundle()
strips away all type information, which makes it not possible to run tools relying on typescript AST. This could be problematic due to same reason as above (import map), and tsc cannot resolving deno's HTTP based imports.