Closed tbranyen closed 10 years ago
defines that use literals should not be converted to IIFE that return the value, we should just directly assign.
define
Example:
define(1234);
which currently compiles to:
var __AMDCLEAN0__ = (function() { return 1234; })();
but, should be optimized to:
var __AMDCLEAN0__ = 1234;
define(function() { return function() { /* my function */ }); });
Could also be optimized:
var __AMDCLEAN0__ = function() { /* my function */ };
Forget it!
define
s that use literals should not be converted to IIFE that return the value, we should just directly assign.Example:
which currently compiles to:
but, should be optimized to: