Created
February 26, 2018 05:24
-
-
Save arackaf/daec959ad9ce9cc8a033ccc3ac6325a3 to your computer and use it in GitHub Desktop.
webpack_demo
This file contains hidden or 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
entry point | |
import junk1 from "./junk1"; | |
import junk2 from "./junk2"; | |
import junk3 from "./junk3"; | |
export default function() { | |
return junk1() + junk2() + junk3(); | |
} | |
// junk1.js | |
export default function() { | |
return Math.random() + 1; | |
} | |
//junk2.js | |
export default function() { | |
return Math.random() + 2; | |
} | |
//junk3.js | |
export default function() { | |
return Math.random() + 3; | |
} | |
//------------------------------------------ | |
//webpack 3 output, in part | |
(function(module, __webpack_exports__, __webpack_require__) { | |
"use strict"; | |
Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); | |
// CONCATENATED MODULE: ./junk1.js | |
/* harmony default export */ var junk1_defaultExport = (function () { | |
return Math.random() + 1; | |
}); | |
// CONCATENATED MODULE: ./junk2.js | |
/* harmony default export */ var junk2_defaultExport = (function () { | |
return Math.random() + 2; | |
}); | |
// CONCATENATED MODULE: ./junk3.js | |
/* harmony default export */ var junk3_defaultExport = (function () { | |
return Math.random() + 3; | |
}); | |
// CONCATENATED MODULE: ./tempMain.js | |
/* harmony default export */ __webpack_exports__["default"] = (function () { | |
return junk1_defaultExport() + junk2_defaultExport() + junk3_defaultExport(); | |
}); | |
/***/ }) | |
//webpack 4 output, in part - boom, functions are inlined | |
function(t, r, e) { | |
"use strict"; | |
e.r(r); | |
r.default = function() { | |
return Math.random() + 1 + (Math.random() + 2) + (Math.random() + 3); | |
}; | |
} | |
]); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment