Closed MelkorNemesis closed 4 years ago
+1
This is a standard UMD that has worked, unchanged, for the better part of a decade. Are you using es5-shim directly, or as part of a bundler? If directly, what was setting the global exports variable? That’s likely to break a good many libraries you might be using.
Separately, This isn’t the right fix, because module = Window
would break your code too, would it not?
The library should be checking for
module
existence instead ofexports
existence. It has happened to us that in the browser for whatever reasonexports
was pointing toWindow
and the module check failed onModule is not defined
on line 25 in this file. Also it doesn't make sense to check for variableA
and then writing to variableB
(I know they're aliases in Node, but that's not the case in browser).