Skip to content

Latest commit

 

History

History
 
 

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

README.md

example.js

require: "./increment"; var a = 1; increment(a); // 2

increment.js

require: "./math"; exports: function increment(val) { return add(val, 1); };

math.js

exports: function add() { var sum = 0, i = 0, args = arguments, l = args.length; while (i < l) { sum += args[i++]; } return sum; };

js/output.js

/******/ (function(modules) { // webpackBootstrap /******/ // The module cache /******/ var installedModules = {}; /******/ /******/ // The require function /******/ function require(moduleId) { /******/ // Check if module is in cache /******/ if(installedModules[moduleId]) /******/ return installedModules[moduleId].exports; /******/ /******/ // Create a new module (and put it into the cache) /******/ var module = installedModules[moduleId] = { /******/ exports: {}, /******/ id: moduleId, /******/ loaded: false /******/ }; /******/ /******/ // Execute the module function /******/ modules[moduleId].call(null, module, module.exports, require); /******/ /******/ // Flag the module as loaded /******/ module.loaded = true; /******/ /******/ // Return the exports of the module /******/ return module.exports; /******/ } /******/ /******/ // The bundle contains no chunks. A empty chunk loading function. /******/ require.e = function requireEnsure(_, callback) { /******/ callback.call(null, require); /******/ }; /******/ /******/ // expose the modules object (__webpack_modules__) /******/ require.modules = modules; /******/ /******/ // expose the module cache /******/ require.cache = installedModules; /******/ /******/ /******/ // Load entry module and return exports /******/ return require(0); /******/ }) /************************************************************************/ /******/ ({ /******/ // __webpack_public_path__ /******/ c: "", /***/ 0: /*!********************!*\  !*** ./example.js ***!  \********************/ /***/ function(module, exports, require) { var __WEBPACK_LABELED_MODULE__1 = require(/*! ./increment */ 1), increment = __WEBPACK_LABELED_MODULE__1.increment; var a = 1; increment(a); // 2 /***/ }, /***/ 1: /*!**********************!*\  !*** ./increment.js ***!  \**********************/ /***/ function(module, exports, require) { var __WEBPACK_LABELED_MODULE__2 = require(/*! ./math */ 2), add = __WEBPACK_LABELED_MODULE__2.add;	exports: exports["increment"] = function increment(val) { return add(val, 1); }; /***/ }, /***/ 2: /*!*****************!*\  !*** ./math.js ***!  \*****************/ /***/ function(module, exports, require) {	exports: exports["add"] = function add() { var sum = 0, i = 0, args = arguments, l = args.length; while (i < l) { sum += args[i++]; } return sum; }; /***/ } /******/ })

The remaining labels are removed while minimizing.

Info

Uncompressed

Hash: 76e286b599e5c0a0757814519c4540d3 Version: webpack 0.10.0-beta6 Time: 39ms Asset Size Chunks Chunk Names output.js 2479 0 [emitted] main chunk {0} output.js (main) 288 [rendered] [0] ./example.js 53 [built] {0} [1] ./increment.js 80 [built] {0} labeled require ./increment [0] ./example.js 1:0-23 [2] ./math.js 155 [built] {0} labeled require ./math [1] ./increment.js 1:0-18 

Minimized (uglify-js, no zip)

Hash: 76e286b599e5c0a0757814519c4540d3 Version: webpack 0.10.0-beta6 Time: 82ms Asset Size Chunks Chunk Names output.js 468 0 [emitted] main chunk {0} output.js (main) 288 [rendered] [0] ./example.js 53 [built] {0} [1] ./increment.js 80 [built] {0} labeled require ./increment [0] ./example.js 1:0-23 [2] ./math.js 155 [built] {0} labeled require ./math [1] ./increment.js 1:0-18