amdclean icon indicating copy to clipboard operation
amdclean copied to clipboard

require with named callback -- the callback is never called

Open aleventhal opened this issue 9 years ago • 1 comments

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!

aleventhal avatar Dec 30 '15 17:12 aleventhal

Similar issue here.

burnpanck avatar Jun 27 '16 09:06 burnpanck