top | item 32469280

(no title)

crowlKats | 3 years ago

deps.ts is currently the most common way, however new projects like fresh use import maps. the problem with importmaps is they are not composable, as such, using an importmap for a library is usually bad as said importmap is not picked up and used, so the end-user would have to add their own importmap with entries compatible for the library (this is what fresh does: it generates an importmap with entries it needs). due to this problem, deps.ts is the most common solution, however I do hope that composability issue with importmaps will change.

discuss

order

conaclos|3 years ago

It could be nice to have import-maps composability. However, I don't think it is planned because browsers' import-maps are not composable. I dislike the deps.ts concept. It is one of the main reason I did not switch to Deno yet.

qbasic_forever|3 years ago

IMHO it's a feature and not a bug that if you import a dependency you also have to carefully review and approve (or add) its dependencies to your application. The entire reason node is a mess of supply chain issues and problems, and is almost like nuclear waste in some professional orgs (i.e. impossible to use because of unclear and unknown licensing concerns, ownership, etc. across thousands of dependencies) is from the ease at which long and complex dependency chains are pulled into a single npm install.

zxvvryu|3 years ago

I would like to see import_maps managed with nix. Deno "lacking" a package manager seems like a great opportunity for content addressable web bundles.

RaitoBezarius|3 years ago

Ha, that's something I was working on and I had a little proof of concept with Aleph.

skybrian|3 years ago

I wonder if Go's approach to version resolution would work here?