Description
@LeaVerou posted a related proposal in https://lea.verou.me/2020/11/the-case-for-weak-dependencies-in-js/.
It would likely be worthwhile to include a comparison to this proposal.
My own intuition would be that they are very much the same sort of thing - in that the imported bindings are bound to the unexecuted module but the module itself has just not executed yet. The tradeoff to consider between both proposals is then just when and how to do the actual execution given we have this import mode / attribute.
In the context of optional dependencies, the concept comes up that another module in the graph that happens to execute the optional dependency will define it for all the other importers. This then entirely moves the execution timing problem back away from the engine to the user API side which might offer more control - would be very useful to compare these execution models.