Hacker News new | ask | show | jobs
by vexna 1888 days ago
I found most of the dependency woes to go away with import maps: https://deno.land/manual@v1.9.0/linking_to_external_code/imp...
3 comments

it seems like libraries can't use import maps though, right? the final binary can provide that flag, but is there a way for library dependencies to specify their own import maps? the spec [1] has support for scoping, but I didn't see a way to integrate that with the Deno loader.

[1] https://github.com/WICG/import-maps#scoping-examples

Yeah, libraries can't use import maps because import maps are not extensible
It's almost like you need something to manage your packages to generate them.
oh damn, that's exactly what i've wanted.
Except you have to make them manually. They could've trivially built a thing that takes your npm package.json and converts it to an import map internally, but instead you gotta manage all that hassle yourself because they don't want to play nice with npm. /rant