fix!: make browser exports the default by broofa · Pull Request #901 · uuidjs/uuid (original) (raw)
Fuckin' hell. node@18 ignores the exports.['.'].node field and uses exports.['.'].default instead... which breaks, of course.
Never mind. I just needed to change the order of the "node" and "default" entries.
Why, you ask? Because someone at node decided it was okay to make order important in a JSON object.
Within the "exports" object, key order is significant. During condition matching, earlier entries have higher priority and take precedence over later entries. The general rule is that conditions should be from most specific to least specific in object order.
This despite the fact order should never be important in a JSON object:
An object is an unordered collection of zero or more name/value pairs.
cc: Whoever the fuck handles this issue.