Skip to content

Named function expressions exported with --export-all #155

@ppissanetzky

Description

@ppissanetzky

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions