The determination of whether the type attribute is part of the module cache key is left up to hosts (as it is for all import attributes).
That's not true. From https://tc39.es/ecma262/#sec-HostLoadImportedModule:
If this operation is called multiple times with two (referrer, moduleRequest) pairs such that:
- the first referrer is the same as the second referrer;
- ModuleRequestsEqual(the first moduleRequest, the second moduleRequest) is true;
and it performs FinishLoadingImportedModule(referrer, moduleRequest, payload, result) where result is a normal completion, then it must perform FinishLoadingImportedModule(referrer, moduleRequest, payload, result) with the same result each time.
The import attributes are part of the module request so they are mandatory for the cache key.
That's not true. From https://tc39.es/ecma262/#sec-HostLoadImportedModule:
The import attributes are part of the module request so they are mandatory for the cache key.