Skip to content

require with named callback -- the callback is never called #106

@aleventhal

Description

@aleventhal

I like to name my callbacks. The hello method below is never called:

function hello() {
  console.log('hi');
}
require(['locale-data/en'], hello); // TODO other languages for extensions

It is transformed to:

(function() {
function hello() {
  console.log('hi');
}
}());

The console.log never happens!

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