Advertisement
Guest User

Untitled

a guest
Mar 26th, 2017
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.80 KB | None | 0 0
  1. // iife
  2. (function(moduleArray) {
  3. var cache = {};
  4. function webpackRequire(index) {
  5. if (cache[index]) {
  6. return cache[index];
  7. }
  8.  
  9. var module = { exports: {} };
  10. var file = moduleArray[index];
  11. file(module, webpackRequire);
  12.  
  13. cache[index] = module.exports;
  14.  
  15. return module.exports;
  16. }
  17.  
  18. return webpackRequire(0);
  19. })(
  20. // All the dependencies here:
  21. [
  22. function(module, webpackRequire){
  23. var hypotenuse = webpackRequire(1);
  24. console.log(hypotenuse(3,4));
  25. },
  26. function(module, webpackRequire) {
  27. var square = webpackRequire(2);
  28. module.exports = function(a, b) {
  29. return Math.sqrt(square(a) + square(b));
  30. }
  31. },
  32. function(module, webpackRequire){
  33. module.exports = function(x) {
  34. return x * x;
  35. }
  36. }
  37. ]
  38. );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement