Open yoavweiss opened 1 month ago
We're eagerly waiting for that proposal to be fleshed out. For now our solution to that problem is publishing on JSR. With JSR each library can have their own import map. Other than that there isn't another option at the moment. We're waiting for the proposal you linked to, to be finished to support nested import maps outside of JSR and npm packages.
That's great to hear!! FWIW, I feel the proposal has already gotten a lot of feedback and is in good shape. I also have a Chromium implementation going, but that is just starting its review process.
Import maps currently have to load before any ES module and there can only be a single import map per document. That makes them fragile and potentially slow to use in real-life scenarios: Any module that loads before them breaks the entire app, and in apps with many modules the become a large blocking resource, as the entire map for all possible modules needs to load first.
There's an HTML PR proposal to enable multiple import maps per document, by merging them in a consistent and deterministic way.
I'd appreciate y'all's opinions.