UMD should always immediately run factory
Author: zhdanovmeCreated Jun 30, 2016Updated Oct 3, 2018
i've got es5-shim with UMD, and synchronous inline script which uses this shim (it must be synchronous due to block html parsing) but require.js resolve es5shim dependency asynchronous, and inline script rise an error, because inline-script run before require(['es5-shim']) is done.
So UMD in case of such libraries, should always immediately run factory and exports for AMD its value;
also there is one more example why it should always immediately run factory, https://github.com/umdjs/umd/issues/78
Source: umdjs/umd