Given this code:
var foo = {
bar: function NO_WAY() {}
};
Running with
--wrap zoo --export-all -b
Results in this:
(function(exports, global) {
global["zoo"] = exports;
var foo = {
bar: function NO_WAY() {}
};
exports["foo"] = foo;
exports["NO_WAY"] = NO_WAY;
})({}, function() {
return this;
}());
The issue is that NO_WAY should not be exported since it is not a global symbol.