Uglify breaks library: "Super expression must either be null or a function, not undefined"
sekoyo opened this issue · comments
Hi,
I think a recent version of Uglify breaks this library which has caused production breakages across the world in the last week as it is only revealed when code is built for production.
This is because tether is built in a bizarre way that for some reason expects Evented
to be globally available: https://github.com/HubSpot/tether/blob/master/src/js/tether.js#L178
I think Evented exists in utils.js
and could have been imported? https://github.com/HubSpot/tether/blob/192ab8a4b1b199bd4f4b51c90ab80ac1b8cca4a6/src/js/utils.js#L296
Thanks
You can see here that tether tries to extend off of nothing when this library is minified:
Unminified it somehow manages to find this global reference:
@dominictobias I believe this should be fixed now. Could you try 2.0.0-beta.2
?
Nice thanks, I'm not in a position to test this now but I'll assume it's fixed and close and tell my ex-colleagues to try it