Created
May 5, 2019 15:56
-
-
Save goto-bus-stop/d65ac2a3b005fd7d6b7432ea6ca4a4da to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var createModuleFactory = /* -- snip -- */ | |
var _$lazy_4 = createModuleFactory(function (module, exports) { | |
// lazy.js | |
console.log('lazy') | |
}); | |
var _$conditional_3 = createModuleFactory(function (module, exports) { | |
// conditional.js | |
console.log('conditional') | |
}); | |
var _$always_2 = {}; | |
// always.js | |
console.log('always') | |
// module.js | |
// Inlined _before_ the code in module.js: | |
_$always_2; | |
if (Math.random() > 0.5) { | |
// Evaluated only if the condition is true: | |
_$conditional_3({}) | |
} | |
module.exports = function () { | |
// Evaluated once this function is first called: | |
return _$lazy_4({}) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// module.js | |
// Inlined _before_ the code in module.js: | |
require('always') | |
if (Math.random() > 0.5) { | |
// Evaluated only if the condition is true: | |
require('conditional') | |
} | |
module.exports = function () { | |
// Evaluated once this function is first called: | |
return require('lazy') | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment