-
Notifications
You must be signed in to change notification settings - Fork 12
Open
Labels
fallback semanticsAn issue with the proposed model for falling back from a LAPI to a polyfillAn issue with the proposed model for falling back from a LAPI to a polyfill
Description
Consider the following scenario:
// a.mjs
import "std:infinite-list|https://cdn-a.com/il.mjs";// b.mjs
import "std:infinite-list|https://cdn-b.com/il.mjs";Both a.mjs and b.mjs are expressing a dependency on the infinite-list layered API. However, they have specified different fallback URLs. This can be problematic, especially in cases such as custom elements which have global side effects.
Alternate fallback styles, e.g. using package name maps or some other centralized mapping, avoid this problem.
Alternately, we could define a sort of first-fallback-wins rule. In this scenario, assuming std:infinite-list is not implemented, then if b.mjs loads first, a.mjs gets interpreted as if they had written import "https://cdn-b.com/il.mjs". This is kind of strange since that string never appears inside the actual text of a.mjs, but it's not too bad IMO...
Metadata
Metadata
Assignees
Labels
fallback semanticsAn issue with the proposed model for falling back from a LAPI to a polyfillAn issue with the proposed model for falling back from a LAPI to a polyfill