updated examples

This commit is contained in:
Tobias Koppers 2013-03-26 18:22:30 +01:00
parent a9250966a6
commit 86ca373134
16 changed files with 1443 additions and 1030 deletions

View File

@ -17,53 +17,85 @@ getTemplate("b", function(b) {
# js/output.js
``` javascript
/******/ (function webpackBootstrap(modules) {
/******/ var installedModules = {};
/******/ var installedChunks = {0:0};
/******/ function require(moduleId) {
/******/ if(installedModules[moduleId])
/******/ return installedModules[moduleId].exports;
/******/ var module = installedModules[moduleId] = {
/******/ exports: {},
/******/ id: moduleId,
/******/ loaded: false
/******/ };
/******/ modules[moduleId].call(null, module, module.exports, require);
/******/ module.loaded = true;
/******/ return module.exports;
/******/ }
/******/ require.e = function requireEnsure(chunkId, callback) {
/******/ if(installedChunks[chunkId] === 0) return callback.call(null, require);
/******/ if(installedChunks[chunkId] !== undefined)
/******/ installedChunks[chunkId].push(callback);
/******/ else {
/******/ installedChunks[chunkId] = [callback];
/******/ var head = document.getElementsByTagName('head')[0];
/******/ var script = document.createElement('script');
/******/ script.type = 'text/javascript';
/******/ script.charset = 'utf-8';
/******/ script.src = modules.c+""+chunkId+".output.js";
/******/ head.appendChild(script);
/******/ }
/******/ };
/******/ require.modules = modules;
/******/ require.cache = installedModules;
/******/ window["webpackJsonp"] = function webpackJsonpCallback(chunkIds, moreModules) {
/******/ var moduleId, chunkId, callbacks = [];
/******/ while(chunkIds.length) {
/******/ chunkId = chunkIds.shift();
/******/ if(installedChunks[chunkId]) callbacks.push.apply(callbacks, installedChunks[chunkId]);
/******/ installedChunks[chunkId] = 0;
/******/ }
/******/ for(moduleId in moreModules)
/******/ modules[moduleId] = moreModules[moduleId];
/******/ while(callbacks.length)
/******/ callbacks.shift().call(null, require);
/******/ };
/******/ return require(0);
/******/ })({
/******/ c: "",
(function(modules) { // webpackBootstrap
// The module cache
var installedModules = {};
// object to store loaded and loading chunks
// "0" means "already loaded"
// Array means "loading", array contains callbacks
var installedChunks = {0:0};
// 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;
}
require.e = function requireEnsure(chunkId, callback) {
// "0" is the signal for "already loaded"
if(installedChunks[chunkId] === 0)
return callback.call(null, require);
// an array means "currently loading".
if(installedChunks[chunkId] !== undefined) {
installedChunks[chunkId].push(callback);
} else {
// start chunk loading
installedChunks[chunkId] = [callback];
var head = document.getElementsByTagName('head')[0];
var script = document.createElement('script');
script.type = 'text/javascript';
script.charset = 'utf-8';
script.src = modules.c + "" + chunkId + ".output.js";
head.appendChild(script);
}
};
require.modules = modules;
require.cache = installedModules;
// install a JSONP callback for chunk loading
window["webpackJsonp"] = function webpackJsonpCallback(chunkIds, moreModules) {
// add "moreModules" to the modules object,
// then flag all "chunkIds" as loaded and fire callback
var moduleId, chunkId, callbacks = [];
while(chunkIds.length) {
chunkId = chunkIds.shift();
if(installedChunks[chunkId])
callbacks.push.apply(callbacks, installedChunks[chunkId]);
installedChunks[chunkId] = 0;
}
for(moduleId in moreModules)
modules[moduleId] = moreModules[moduleId];
while(callbacks.length)
callbacks.shift().call(null, require);
};
// Load entry module and return exports
return require(0);
})
/************************************************************************/
({
// __webpack_public_path__
c: "",
/***/ 0:
/*!********************!*\
!*** ./example.js ***!
@ -83,14 +115,14 @@ getTemplate("b", function(b) {
});
/***/ }
/******/ })
})
```
# js/1.output.js
``` javascript
webpackJsonp([1], {
webpackJsonp([1],
{
/***/ 1:
/*!*********************************************!*\
@ -157,7 +189,8 @@ webpackJsonp([1], {
/***/ }
})
}
)
```
# Info
@ -165,11 +198,12 @@ webpackJsonp([1], {
## Uncompressed
```
Hash: 053e43bcefccb7b19cd6a3e30104879a
Time: 38ms
Hash: 7a6425e8fe46dc01a0db9eee1a97caca
Version: webpack 0.10.0-beta1
Time: 54ms
Asset Size Chunks Chunk Names
output.js 2476 0 main
1.output.js 1589 1
output.js 2793 0 main
1.output.js 1567 1
chunk {0} output.js (main) 261
[0] ./example.js 261 [built] {0}
chunk {1} 1.output.js 463 {0}
@ -189,8 +223,9 @@ chunk {1} 1.output.js 463 {0}
## Minimized (uglify-js, no zip)
```
Hash: 053e43bcefccb7b19cd6a3e30104879a
Time: 155ms
Hash: 7a6425e8fe46dc01a0db9eee1a97caca
Version: webpack 0.10.0-beta1
Time: 185ms
Asset Size Chunks Chunk Names
output.js 831 0 main
1.output.js 531 1

View File

@ -17,53 +17,85 @@ getTemplate("b", function(b) {
# js/output.js
``` javascript
/******/ (function webpackBootstrap(modules) {
/******/ var installedModules = {};
/******/ var installedChunks = {0:0};
/******/ function require(moduleId) {
/******/ if(installedModules[moduleId])
/******/ return installedModules[moduleId].exports;
/******/ var module = installedModules[moduleId] = {
/******/ exports: {},
/******/ id: moduleId,
/******/ loaded: false
/******/ };
/******/ modules[moduleId].call(null, module, module.exports, require);
/******/ module.loaded = true;
/******/ return module.exports;
/******/ }
/******/ require.e = function requireEnsure(chunkId, callback) {
/******/ if(installedChunks[chunkId] === 0) return callback.call(null, require);
/******/ if(installedChunks[chunkId] !== undefined)
/******/ installedChunks[chunkId].push(callback);
/******/ else {
/******/ installedChunks[chunkId] = [callback];
/******/ var head = document.getElementsByTagName('head')[0];
/******/ var script = document.createElement('script');
/******/ script.type = 'text/javascript';
/******/ script.charset = 'utf-8';
/******/ script.src = modules.c+""+chunkId+".output.js";
/******/ head.appendChild(script);
/******/ }
/******/ };
/******/ require.modules = modules;
/******/ require.cache = installedModules;
/******/ window["webpackJsonp"] = function webpackJsonpCallback(chunkIds, moreModules) {
/******/ var moduleId, chunkId, callbacks = [];
/******/ while(chunkIds.length) {
/******/ chunkId = chunkIds.shift();
/******/ if(installedChunks[chunkId]) callbacks.push.apply(callbacks, installedChunks[chunkId]);
/******/ installedChunks[chunkId] = 0;
/******/ }
/******/ for(moduleId in moreModules)
/******/ modules[moduleId] = moreModules[moduleId];
/******/ while(callbacks.length)
/******/ callbacks.shift().call(null, require);
/******/ };
/******/ return require(0);
/******/ })({
/******/ c: "",
(function(modules) { // webpackBootstrap
// The module cache
var installedModules = {};
// object to store loaded and loading chunks
// "0" means "already loaded"
// Array means "loading", array contains callbacks
var installedChunks = {0:0};
// 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;
}
require.e = function requireEnsure(chunkId, callback) {
// "0" is the signal for "already loaded"
if(installedChunks[chunkId] === 0)
return callback.call(null, require);
// an array means "currently loading".
if(installedChunks[chunkId] !== undefined) {
installedChunks[chunkId].push(callback);
} else {
// start chunk loading
installedChunks[chunkId] = [callback];
var head = document.getElementsByTagName('head')[0];
var script = document.createElement('script');
script.type = 'text/javascript';
script.charset = 'utf-8';
script.src = modules.c + "" + chunkId + ".output.js";
head.appendChild(script);
}
};
require.modules = modules;
require.cache = installedModules;
// install a JSONP callback for chunk loading
window["webpackJsonp"] = function webpackJsonpCallback(chunkIds, moreModules) {
// add "moreModules" to the modules object,
// then flag all "chunkIds" as loaded and fire callback
var moduleId, chunkId, callbacks = [];
while(chunkIds.length) {
chunkId = chunkIds.shift();
if(installedChunks[chunkId])
callbacks.push.apply(callbacks, installedChunks[chunkId]);
installedChunks[chunkId] = 0;
}
for(moduleId in moreModules)
modules[moduleId] = moreModules[moduleId];
while(callbacks.length)
callbacks.shift().call(null, require);
};
// Load entry module and return exports
return require(0);
})
/************************************************************************/
({
// __webpack_public_path__
c: "",
/***/ 0:
/*!********************!*\
!*** ./example.js ***!
@ -83,14 +115,14 @@ getTemplate("b", function(b) {
});
/***/ }
/******/ })
})
```
# js/1.output.js
``` javascript
webpackJsonp([1], {
webpackJsonp([1],
{
/***/ 1:
/*!*********************************************!*\
@ -157,7 +189,8 @@ webpackJsonp([1], {
/***/ }
})
}
)
```
# Info
@ -165,11 +198,12 @@ webpackJsonp([1], {
## Uncompressed
```
Hash: 64794fb1a8ae78099ec51cabeb1a694e
Time: 37ms
Hash: bfc8a0c89870057a328ac4537518a669
Version: webpack 0.10.0-beta1
Time: 52ms
Asset Size Chunks Chunk Names
output.js 2364 0 main
1.output.js 1589 1
output.js 2681 0 main
1.output.js 1567 1
chunk {0} output.js (main) 276
[0] ./example.js 276 [built] {0}
chunk {1} 1.output.js 463 {0}
@ -189,8 +223,9 @@ chunk {1} 1.output.js 463 {0}
## Minimized (uglify-js, no zip)
```
Hash: 64794fb1a8ae78099ec51cabeb1a694e
Time: 154ms
Hash: bfc8a0c89870057a328ac4537518a669
Version: webpack 0.10.0-beta1
Time: 163ms
Asset Size Chunks Chunk Names
output.js 792 0 main
1.output.js 531 1

View File

@ -16,53 +16,85 @@ module.exports = "It works";
# js/output.js
``` javascript
/******/ (function webpackBootstrap(modules) {
/******/ var installedModules = {};
/******/ var installedChunks = {0:0};
/******/ function require(moduleId) {
/******/ if(installedModules[moduleId])
/******/ return installedModules[moduleId].exports;
/******/ var module = installedModules[moduleId] = {
/******/ exports: {},
/******/ id: moduleId,
/******/ loaded: false
/******/ };
/******/ modules[moduleId].call(null, module, module.exports, require);
/******/ module.loaded = true;
/******/ return module.exports;
/******/ }
/******/ require.e = function requireEnsure(chunkId, callback) {
/******/ if(installedChunks[chunkId] === 0) return callback.call(null, require);
/******/ if(installedChunks[chunkId] !== undefined)
/******/ installedChunks[chunkId].push(callback);
/******/ else {
/******/ installedChunks[chunkId] = [callback];
/******/ var head = document.getElementsByTagName('head')[0];
/******/ var script = document.createElement('script');
/******/ script.type = 'text/javascript';
/******/ script.charset = 'utf-8';
/******/ script.src = modules.c+""+chunkId+".output.js";
/******/ head.appendChild(script);
/******/ }
/******/ };
/******/ require.modules = modules;
/******/ require.cache = installedModules;
/******/ window["webpackJsonp"] = function webpackJsonpCallback(chunkIds, moreModules) {
/******/ var moduleId, chunkId, callbacks = [];
/******/ while(chunkIds.length) {
/******/ chunkId = chunkIds.shift();
/******/ if(installedChunks[chunkId]) callbacks.push.apply(callbacks, installedChunks[chunkId]);
/******/ installedChunks[chunkId] = 0;
/******/ }
/******/ for(moduleId in moreModules)
/******/ modules[moduleId] = moreModules[moduleId];
/******/ while(callbacks.length)
/******/ callbacks.shift().call(null, require);
/******/ };
/******/ return require(0);
/******/ })({
/******/ c: "",
(function(modules) { // webpackBootstrap
// The module cache
var installedModules = {};
// object to store loaded and loading chunks
// "0" means "already loaded"
// Array means "loading", array contains callbacks
var installedChunks = {0:0};
// 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;
}
require.e = function requireEnsure(chunkId, callback) {
// "0" is the signal for "already loaded"
if(installedChunks[chunkId] === 0)
return callback.call(null, require);
// an array means "currently loading".
if(installedChunks[chunkId] !== undefined) {
installedChunks[chunkId].push(callback);
} else {
// start chunk loading
installedChunks[chunkId] = [callback];
var head = document.getElementsByTagName('head')[0];
var script = document.createElement('script');
script.type = 'text/javascript';
script.charset = 'utf-8';
script.src = modules.c + "" + chunkId + ".output.js";
head.appendChild(script);
}
};
require.modules = modules;
require.cache = installedModules;
// install a JSONP callback for chunk loading
window["webpackJsonp"] = function webpackJsonpCallback(chunkIds, moreModules) {
// add "moreModules" to the modules object,
// then flag all "chunkIds" as loaded and fire callback
var moduleId, chunkId, callbacks = [];
while(chunkIds.length) {
chunkId = chunkIds.shift();
if(installedChunks[chunkId])
callbacks.push.apply(callbacks, installedChunks[chunkId]);
installedChunks[chunkId] = 0;
}
for(moduleId in moreModules)
modules[moduleId] = moreModules[moduleId];
while(callbacks.length)
callbacks.shift().call(null, require);
};
// Load entry module and return exports
return require(0);
})
/************************************************************************/
({
// __webpack_public_path__
c: "",
/***/ 0:
/*!********************!*\
!*** ./example.js ***!
@ -97,14 +129,14 @@ module.exports = "It works";
});
/***/ }
/******/ })
})
```
# js/1.output.js
``` javascript
webpackJsonp([1], {
webpackJsonp([1],
{
/***/ 2:
/*!*****************!*\
@ -116,7 +148,8 @@ webpackJsonp([1], {
/***/ }
})
}
)
```
# Info
@ -124,10 +157,11 @@ webpackJsonp([1], {
## Uncompressed
```
Hash: aaea93e88ddd185dbf5a5109059d3d08
Time: 60ms
Hash: d75e46ac811b482356205a47ab1dc1c0
Version: webpack 0.10.0-beta1
Time: 67ms
Asset Size Chunks Chunk Names
output.js 2806 0 main
output.js 3109 0 main
1.output.js 184 1
chunk {0} output.js (main) 486
[0] ./example.js 88 [built] {0}
@ -141,8 +175,9 @@ chunk {1} 1.output.js 28 {0}
## Minimized (uglify-js, no zip)
```
Hash: aaea93e88ddd185dbf5a5109059d3d08
Time: 146ms
Hash: d75e46ac811b482356205a47ab1dc1c0
Version: webpack 0.10.0-beta1
Time: 155ms
Asset Size Chunks Chunk Names
output.js 853 0 main
1.output.js 56 1

View File

@ -13,53 +13,85 @@ require.ensure(["c"], function(require) {
# js/output.js
``` javascript
/******/ (function webpackBootstrap(modules) {
/******/ var installedModules = {};
/******/ var installedChunks = {0:0};
/******/ function require(moduleId) {
/******/ if(installedModules[moduleId])
/******/ return installedModules[moduleId].exports;
/******/ var module = installedModules[moduleId] = {
/******/ exports: {},
/******/ id: moduleId,
/******/ loaded: false
/******/ };
/******/ modules[moduleId].call(null, module, module.exports, require);
/******/ module.loaded = true;
/******/ return module.exports;
/******/ }
/******/ require.e = function requireEnsure(chunkId, callback) {
/******/ if(installedChunks[chunkId] === 0) return callback.call(null, require);
/******/ if(installedChunks[chunkId] !== undefined)
/******/ installedChunks[chunkId].push(callback);
/******/ else {
/******/ installedChunks[chunkId] = [callback];
/******/ var head = document.getElementsByTagName('head')[0];
/******/ var script = document.createElement('script');
/******/ script.type = 'text/javascript';
/******/ script.charset = 'utf-8';
/******/ script.src = modules.c+""+chunkId+".output.js";
/******/ head.appendChild(script);
/******/ }
/******/ };
/******/ require.modules = modules;
/******/ require.cache = installedModules;
/******/ window["webpackJsonp"] = function webpackJsonpCallback(chunkIds, moreModules) {
/******/ var moduleId, chunkId, callbacks = [];
/******/ while(chunkIds.length) {
/******/ chunkId = chunkIds.shift();
/******/ if(installedChunks[chunkId]) callbacks.push.apply(callbacks, installedChunks[chunkId]);
/******/ installedChunks[chunkId] = 0;
/******/ }
/******/ for(moduleId in moreModules)
/******/ modules[moduleId] = moreModules[moduleId];
/******/ while(callbacks.length)
/******/ callbacks.shift().call(null, require);
/******/ };
/******/ return require(0);
/******/ })({
/******/ c: "",
(function(modules) { // webpackBootstrap
// The module cache
var installedModules = {};
// object to store loaded and loading chunks
// "0" means "already loaded"
// Array means "loading", array contains callbacks
var installedChunks = {0:0};
// 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;
}
require.e = function requireEnsure(chunkId, callback) {
// "0" is the signal for "already loaded"
if(installedChunks[chunkId] === 0)
return callback.call(null, require);
// an array means "currently loading".
if(installedChunks[chunkId] !== undefined) {
installedChunks[chunkId].push(callback);
} else {
// start chunk loading
installedChunks[chunkId] = [callback];
var head = document.getElementsByTagName('head')[0];
var script = document.createElement('script');
script.type = 'text/javascript';
script.charset = 'utf-8';
script.src = modules.c + "" + chunkId + ".output.js";
head.appendChild(script);
}
};
require.modules = modules;
require.cache = installedModules;
// install a JSONP callback for chunk loading
window["webpackJsonp"] = function webpackJsonpCallback(chunkIds, moreModules) {
// add "moreModules" to the modules object,
// then flag all "chunkIds" as loaded and fire callback
var moduleId, chunkId, callbacks = [];
while(chunkIds.length) {
chunkId = chunkIds.shift();
if(installedChunks[chunkId])
callbacks.push.apply(callbacks, installedChunks[chunkId]);
installedChunks[chunkId] = 0;
}
for(moduleId in moreModules)
modules[moduleId] = moreModules[moduleId];
while(callbacks.length)
callbacks.shift().call(null, require);
};
// Load entry module and return exports
return require(0);
})
/************************************************************************/
({
// __webpack_public_path__
c: "",
/***/ 0:
/*!********************!*\
!*** ./example.js ***!
@ -94,14 +126,14 @@ require.ensure(["c"], function(require) {
// module a
/***/ }
/******/ })
})
```
# js/1.output.js
``` javascript
webpackJsonp([1], {
webpackJsonp([1],
{
/***/ 3:
/*!****************!*\
@ -123,7 +155,8 @@ webpackJsonp([1], {
/***/ }
})
}
)
```
Minimized
@ -137,11 +170,12 @@ webpackJsonp([1],{3:function(){},4:function(){}});
## Uncompressed
```
Hash: 3d676be1f90fd9a9422053e02c1982e7
Time: 38ms
Hash: 5543ff7619209e2d2e8aeebc12be7462
Version: webpack 0.10.0-beta1
Time: 42ms
Asset Size Chunks Chunk Names
output.js 2529 0 main
1.output.js 306 1
output.js 2844 0 main
1.output.js 305 1
chunk {0} output.js (main) 166
[0] ./example.js 144 [built] {0}
[1] ./~/b.js 11 [built] {0}
@ -159,8 +193,9 @@ chunk {1} 1.output.js 22 {0}
## Minimized (uglify-js, no zip)
```
Hash: 3d676be1f90fd9a9422053e02c1982e7
Time: 128ms
Hash: 5543ff7619209e2d2e8aeebc12be7462
Version: webpack 0.10.0-beta1
Time: 135ms
Asset Size Chunks Chunk Names
output.js 744 0 main
1.output.js 50 1

View File

@ -26,29 +26,48 @@ module.exports = 42
# js/output.js
``` javascript
/******/ (function webpackBootstrap(modules) {
/******/ var installedModules = {};
/******/ function require(moduleId) {
/******/ if(installedModules[moduleId])
/******/ return installedModules[moduleId].exports;
/******/ var module = installedModules[moduleId] = {
/******/ exports: {},
/******/ id: moduleId,
/******/ loaded: false
/******/ };
/******/ modules[moduleId].call(null, module, module.exports, require);
/******/ module.loaded = true;
/******/ return module.exports;
/******/ }
/******/ require.e = function requireEnsure(chunkId, callback) {
/******/ callback.call(null, require);
/******/ };
/******/ require.modules = modules;
/******/ require.cache = installedModules;
/******/ return require(0);
/******/ })({
/******/ c: "",
(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;
}
require.e = function requireEnsure(_, callback) {
callback.call(null, require);
};
require.modules = modules;
require.cache = installedModules;
// Load entry module and return exports
return require(0);
})
/************************************************************************/
({
// __webpack_public_path__
c: "",
/***/ 0:
/*!********************!*\
!*** ./example.js ***!
@ -65,7 +84,6 @@ module.exports = 42
\*********************/
/***/ function(module, exports, require) {
console.log("yeah coffee-script");
module.exports = 42;
@ -79,7 +97,6 @@ module.exports = 42
\*********************/
/***/ function(module, exports, require) {
module.exports = {
cool: "stuff",
answer: 42,
@ -89,8 +106,7 @@ module.exports = 42
/***/ }
/******/ })
})
```
# Info
@ -98,31 +114,33 @@ module.exports = 42
## Uncompressed
```
Hash: 30dcf8e5b6f3a18a2eb8eab2188e0643
Time: 139ms
Hash: 5394516f6bbce8cc020e6c170fd62636
Version: webpack 0.10.0-beta1
Time: 172ms
Asset Size Chunks Chunk Names
output.js 1465 0 main
chunk {0} output.js (main) 208
output.js 1601 0 main
chunk {0} output.js (main) 206
[0] ./example.js 31 [built] {0}
[1] ./cup2.coffee 58 [built] {0}
cjs require ./cup2 [2] ./cup1.coffee 6:9-26
cjs require ./cup2.coffee [2] ./cup1.coffee 5:12-36
[2] ./cup1.coffee 119 [built] {0}
[1] ./cup2.coffee 57 [built] {0}
cjs require ./cup2 [2] ./cup1.coffee 5:9-26
cjs require ./cup2.coffee [2] ./cup1.coffee 4:12-36
[2] ./cup1.coffee 118 [built] {0}
cjs require ./cup1 [0] ./example.js 1:12-29
```
## Minimized (uglify-js, no zip)
```
Hash: 30dcf8e5b6f3a18a2eb8eab2188e0643
Time: 382ms
Hash: 5394516f6bbce8cc020e6c170fd62636
Version: webpack 0.10.0-beta1
Time: 228ms
Asset Size Chunks Chunk Names
output.js 418 0 main
chunk {0} output.js (main) 208
chunk {0} output.js (main) 206
[0] ./example.js 31 [built] {0}
[1] ./cup2.coffee 58 [built] {0}
cjs require ./cup2 [2] ./cup1.coffee 6:9-26
cjs require ./cup2.coffee [2] ./cup1.coffee 5:12-36
[2] ./cup1.coffee 119 [built] {0}
[1] ./cup2.coffee 57 [built] {0}
cjs require ./cup2 [2] ./cup1.coffee 5:9-26
cjs require ./cup2.coffee [2] ./cup1.coffee 4:12-36
[2] ./cup1.coffee 118 [built] {0}
cjs require ./cup1 [0] ./example.js 1:12-29
```

View File

@ -31,29 +31,48 @@ exports.add = function() {
# js/output.js
``` javascript
/******/ (function webpackBootstrap(modules) {
/******/ var installedModules = {};
/******/ function require(moduleId) {
/******/ if(installedModules[moduleId])
/******/ return installedModules[moduleId].exports;
/******/ var module = installedModules[moduleId] = {
/******/ exports: {},
/******/ id: moduleId,
/******/ loaded: false
/******/ };
/******/ modules[moduleId].call(null, module, module.exports, require);
/******/ module.loaded = true;
/******/ return module.exports;
/******/ }
/******/ require.e = function requireEnsure(chunkId, callback) {
/******/ callback.call(null, require);
/******/ };
/******/ require.modules = modules;
/******/ require.cache = installedModules;
/******/ return require(0);
/******/ })({
/******/ c: "",
(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;
}
require.e = function requireEnsure(_, callback) {
callback.call(null, require);
};
require.modules = modules;
require.cache = installedModules;
// Load entry module and return exports
return require(0);
})
/************************************************************************/
({
// __webpack_public_path__
c: "",
/***/ 0:
/*!********************!*\
!*** ./example.js ***!
@ -94,8 +113,7 @@ exports.add = function() {
};
/***/ }
/******/ })
})
```
# Info
@ -103,10 +121,11 @@ exports.add = function() {
## Uncompressed
```
Hash: 4c611f00cd8c22d720b7d5e5cf4d0cc2
Time: 31ms
Hash: b3372208595e483f54eaa29577bc99f8
Version: webpack 0.10.0-beta1
Time: 33ms
Asset Size Chunks Chunk Names
output.js 1559 0 main
output.js 1708 0 main
chunk {0} output.js (main) 329
[0] ./example.js 69 [built] {0}
[1] ./increment.js 98 [built] {0}
@ -118,8 +137,9 @@ chunk {0} output.js (main) 329
## Minimized (uglify-js, no zip)
```
Hash: 4c611f00cd8c22d720b7d5e5cf4d0cc2
Time: 84ms
Hash: b3372208595e483f54eaa29577bc99f8
Version: webpack 0.10.0-beta1
Time: 96ms
Asset Size Chunks Chunk Names
output.js 460 0 main
chunk {0} output.js (main) 329

View File

@ -72,29 +72,48 @@ module.exports = {
# js/output.js
``` javascript
/******/ (function webpackBootstrap(modules) {
/******/ var installedModules = {};
/******/ function require(moduleId) {
/******/ if(installedModules[moduleId])
/******/ return installedModules[moduleId].exports;
/******/ var module = installedModules[moduleId] = {
/******/ exports: {},
/******/ id: moduleId,
/******/ loaded: false
/******/ };
/******/ modules[moduleId].call(null, module, module.exports, require);
/******/ module.loaded = true;
/******/ return module.exports;
/******/ }
/******/ require.e = function requireEnsure(chunkId, callback) {
/******/ callback.call(null, require);
/******/ };
/******/ require.modules = modules;
/******/ require.cache = installedModules;
/******/ return require(0);
/******/ })({
/******/ c: "",
(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;
}
require.e = function requireEnsure(_, callback) {
callback.call(null, require);
};
require.modules = modules;
require.cache = installedModules;
// Load entry module and return exports
return require(0);
})
/************************************************************************/
({
// __webpack_public_path__
c: "",
/***/ 0:
/*!********************!*\
!*** ./example.js ***!
@ -222,8 +241,7 @@ module.exports = {
module.exports = "B";
/***/ }
/******/ })
})
```
# Info
@ -231,10 +249,11 @@ module.exports = {
## Uncompressed
```
Hash: 9a9389bf1908b5568ad6f8fe413a0627
Time: 120ms
Hash: 90defdf491ebab80d48bd42ea1f7c17d
Version: webpack 0.10.0-beta1
Time: 124ms
Asset Size Chunks Chunk Names
output.js 6031 0 main
output.js 6167 0 main
chunk {0} output.js (main) 1981
[0] ./example.js 111 [built] {0}
[1] ./component/webpack-a-component (component) 328 [built] {0}
@ -263,8 +282,9 @@ chunk {0} output.js (main) 1981
## Minimized (uglify-js, no zip)
```
Hash: 3347ab710ad08b8494aec6ba77f9509b
Time: 199ms
Hash: 347d579347a144b45a78b34863b12b79
Version: webpack 0.10.0-beta1
Time: 466ms
Asset Size Chunks Chunk Names
output.js 1243 0 main
chunk {0} output.js (main) 1960

View File

@ -33,29 +33,48 @@ module.exports = {
# js/output.js
``` javascript
/******/ (function webpackBootstrap(modules) {
/******/ var installedModules = {};
/******/ function require(moduleId) {
/******/ if(installedModules[moduleId])
/******/ return installedModules[moduleId].exports;
/******/ var module = installedModules[moduleId] = {
/******/ exports: {},
/******/ id: moduleId,
/******/ loaded: false
/******/ };
/******/ modules[moduleId].call(null, module, module.exports, require);
/******/ module.loaded = true;
/******/ return module.exports;
/******/ }
/******/ require.e = function requireEnsure(chunkId, callback) {
/******/ callback.call(null, require);
/******/ };
/******/ require.modules = modules;
/******/ require.cache = installedModules;
/******/ return require(0);
/******/ })({
/******/ c: "",
(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;
}
require.e = function requireEnsure(_, callback) {
callback.call(null, require);
};
require.modules = modules;
require.cache = installedModules;
// Load entry module and return exports
return require(0);
})
/************************************************************************/
({
// __webpack_public_path__
c: "",
/***/ 0:
/*!********************!*\
!*** ./example.js ***!
@ -66,8 +85,7 @@ module.exports = {
console.log("Missing Text");
/***/ }
/******/ })
})
```
# Info
@ -75,10 +93,11 @@ module.exports = {
## Uncompressed
```
Hash: 6dd5f9550269e46e82b8dd537732bdfa
Time: 17ms
Hash: a738ac89a403e736beace631044222a3
Version: webpack 0.10.0-beta1
Time: 20ms
Asset Size Chunks Chunk Names
output.js 989 0 main
output.js 1139 0 main
chunk {0} output.js (main) 64
[0] ./example.js 64 [built] {0}
@ -89,8 +108,9 @@ Missing localization: Missing Text
## Minimized (uglify-js, no zip)
```
Hash: 6dd5f9550269e46e82b8dd537732bdfa
Time: 52ms
Hash: a738ac89a403e736beace631044222a3
Version: webpack 0.10.0-beta1
Time: 61ms
Asset Size Chunks Chunk Names
output.js 308 0 main
chunk {0} output.js (main) 64

View File

@ -30,29 +30,48 @@ exports: function add() {
# js/output.js
``` javascript
/******/ (function webpackBootstrap(modules) {
/******/ var installedModules = {};
/******/ function require(moduleId) {
/******/ if(installedModules[moduleId])
/******/ return installedModules[moduleId].exports;
/******/ var module = installedModules[moduleId] = {
/******/ exports: {},
/******/ id: moduleId,
/******/ loaded: false
/******/ };
/******/ modules[moduleId].call(null, module, module.exports, require);
/******/ module.loaded = true;
/******/ return module.exports;
/******/ }
/******/ require.e = function requireEnsure(chunkId, callback) {
/******/ callback.call(null, require);
/******/ };
/******/ require.modules = modules;
/******/ require.cache = installedModules;
/******/ return require(0);
/******/ })({
/******/ c: "",
(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;
}
require.e = function requireEnsure(_, callback) {
callback.call(null, require);
};
require.modules = modules;
require.cache = installedModules;
// Load entry module and return exports
return require(0);
})
/************************************************************************/
({
// __webpack_public_path__
c: "",
/***/ 0:
/*!********************!*\
!*** ./example.js ***!
@ -93,8 +112,7 @@ exports: function add() {
};
/***/ }
/******/ })
})
```
The remaining labels are removed while minimizing.
@ -104,10 +122,11 @@ The remaining labels are removed while minimizing.
## Uncompressed
```
Hash: 77a9971b44e556189b1ad3d848f5ea9c
Time: 30ms
Hash: 7167162ed42199dd8fc82db2097674eb
Version: webpack 0.10.0-beta1
Time: 35ms
Asset Size Chunks Chunk Names
output.js 1727 0 main
output.js 1876 0 main
chunk {0} output.js (main) 299
[0] ./example.js 55 [built] {0}
[1] ./increment.js 83 [built] {0}
@ -119,8 +138,9 @@ chunk {0} output.js (main) 299
## Minimized (uglify-js, no zip)
```
Hash: 77a9971b44e556189b1ad3d848f5ea9c
Time: 82ms
Hash: 7167162ed42199dd8fc82db2097674eb
Version: webpack 0.10.0-beta1
Time: 96ms
Asset Size Chunks Chunk Names
output.js 468 0 main
chunk {0} output.js (main) 299

View File

@ -34,29 +34,48 @@ module.exports = function(content) {
# js/output.js
``` javascript
/******/ (function webpackBootstrap(modules) {
/******/ var installedModules = {};
/******/ function require(moduleId) {
/******/ if(installedModules[moduleId])
/******/ return installedModules[moduleId].exports;
/******/ var module = installedModules[moduleId] = {
/******/ exports: {},
/******/ id: moduleId,
/******/ loaded: false
/******/ };
/******/ modules[moduleId].call(null, module, module.exports, require);
/******/ module.loaded = true;
/******/ return module.exports;
/******/ }
/******/ require.e = function requireEnsure(chunkId, callback) {
/******/ callback.call(null, require);
/******/ };
/******/ require.modules = modules;
/******/ require.cache = installedModules;
/******/ return require(0);
/******/ })({
/******/ c: "",
(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;
}
require.e = function requireEnsure(_, callback) {
callback.call(null, require);
};
require.modules = modules;
require.cache = installedModules;
// Load entry module and return exports
return require(0);
})
/************************************************************************/
({
// __webpack_public_path__
c: "",
/***/ 0:
/*!********************!*\
!*** ./example.js ***!
@ -94,8 +113,7 @@ module.exports = function(content) {
exports.foo = "bar";
/***/ }
/******/ })
})
```
# Console output
@ -113,10 +131,11 @@ Prints in node.js (`enhanced-require example.js`) and in browser:
## Uncompressed
```
Hash: 2f64cd43907e15c39cc8d84534efe0a2
Time: 50ms
Hash: 5caaa03683d41f386ba25cd5e2812588
Version: webpack 0.10.0-beta1
Time: 57ms
Asset Size Chunks Chunk Names
output.js 1743 0 main
output.js 1889 0 main
chunk {0} output.js (main) 282
[0] ./example.js 205 [built] {0}
[1] (webpack)/~/json-loader!./test.json 36 [built] {0}

View File

@ -75,53 +75,85 @@ require(
# js/output.js
``` javascript
/******/ (function webpackBootstrap(modules) {
/******/ var installedModules = {};
/******/ var installedChunks = {0:0};
/******/ function require(moduleId) {
/******/ if(installedModules[moduleId])
/******/ return installedModules[moduleId].exports;
/******/ var module = installedModules[moduleId] = {
/******/ exports: {},
/******/ id: moduleId,
/******/ loaded: false
/******/ };
/******/ modules[moduleId].call(null, module, module.exports, require);
/******/ module.loaded = true;
/******/ return module.exports;
/******/ }
/******/ require.e = function requireEnsure(chunkId, callback) {
/******/ if(installedChunks[chunkId] === 0) return callback.call(null, require);
/******/ if(installedChunks[chunkId] !== undefined)
/******/ installedChunks[chunkId].push(callback);
/******/ else {
/******/ installedChunks[chunkId] = [callback];
/******/ var head = document.getElementsByTagName('head')[0];
/******/ var script = document.createElement('script');
/******/ script.type = 'text/javascript';
/******/ script.charset = 'utf-8';
/******/ script.src = modules.c+""+chunkId+".output.js";
/******/ head.appendChild(script);
/******/ }
/******/ };
/******/ require.modules = modules;
/******/ require.cache = installedModules;
/******/ window["webpackJsonp"] = function webpackJsonpCallback(chunkIds, moreModules) {
/******/ var moduleId, chunkId, callbacks = [];
/******/ while(chunkIds.length) {
/******/ chunkId = chunkIds.shift();
/******/ if(installedChunks[chunkId]) callbacks.push.apply(callbacks, installedChunks[chunkId]);
/******/ installedChunks[chunkId] = 0;
/******/ }
/******/ for(moduleId in moreModules)
/******/ modules[moduleId] = moreModules[moduleId];
/******/ while(callbacks.length)
/******/ callbacks.shift().call(null, require);
/******/ };
/******/ return require(0);
/******/ })({
/******/ c: "",
(function(modules) { // webpackBootstrap
// The module cache
var installedModules = {};
// object to store loaded and loading chunks
// "0" means "already loaded"
// Array means "loading", array contains callbacks
var installedChunks = {0:0};
// 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;
}
require.e = function requireEnsure(chunkId, callback) {
// "0" is the signal for "already loaded"
if(installedChunks[chunkId] === 0)
return callback.call(null, require);
// an array means "currently loading".
if(installedChunks[chunkId] !== undefined) {
installedChunks[chunkId].push(callback);
} else {
// start chunk loading
installedChunks[chunkId] = [callback];
var head = document.getElementsByTagName('head')[0];
var script = document.createElement('script');
script.type = 'text/javascript';
script.charset = 'utf-8';
script.src = modules.c + "" + chunkId + ".output.js";
head.appendChild(script);
}
};
require.modules = modules;
require.cache = installedModules;
// install a JSONP callback for chunk loading
window["webpackJsonp"] = function webpackJsonpCallback(chunkIds, moreModules) {
// add "moreModules" to the modules object,
// then flag all "chunkIds" as loaded and fire callback
var moduleId, chunkId, callbacks = [];
while(chunkIds.length) {
chunkId = chunkIds.shift();
if(installedChunks[chunkId])
callbacks.push.apply(callbacks, installedChunks[chunkId]);
installedChunks[chunkId] = 0;
}
for(moduleId in moreModules)
modules[moduleId] = moreModules[moduleId];
while(callbacks.length)
callbacks.shift().call(null, require);
};
// Load entry module and return exports
return require(0);
})
/************************************************************************/
({
// __webpack_public_path__
c: "",
/***/ 0:
/*!********************!*\
!*** ./example.js ***!
@ -198,14 +230,14 @@ require(
}.apply(null, __WEBPACK_AMD_REQUIRE_ARRAY__));});
/***/ }
/******/ })
})
```
# js/1.output.js
``` javascript
webpackJsonp([1], {
webpackJsonp([1],
{
/***/ 4:
/*!*************************************************!*\
@ -269,7 +301,8 @@ webpackJsonp([1], {
/***/ }
})
}
)
```
# Info
@ -277,37 +310,38 @@ webpackJsonp([1], {
## Uncompressed
```
Hash: 516dce8c57b3158b12d5ec4b5ec0c704
Time: 62ms
Hash: c742d10da02e7180be4429633fb7f3af
Version: webpack 0.10.0-beta1
Time: 77ms
Asset Size Chunks Chunk Names
output.js 4786 0 main
1.output.js 1565 1
output.js 5100 0 main
1.output.js 1546 1
chunk {0} output.js (main) 1395
[0] ./example.js 613 [built] {0}
[1] ./amd.js 309 [built] {0}
amd require ./amd [2] ./commonjs.js 5:0-11:1
cjs require ./amd [2] ./commonjs.js 8:13-29
cjs require ./amd [0] ./example.js 3:11-27
amd require ./amd [0] ./example.js 7:0-14:1
amd require ./amd [0] ./example.js 7:0-14:1
amd require ./amd [3] ./labeled.js 5:0-11:1
cjs require ./amd [3] ./labeled.js 9:13-29
amd require ./amd [2] ./commonjs.js 5:0-11:1
cjs require ./amd [2] ./commonjs.js 8:13-29
[2] ./commonjs.js 234 [built] {0}
cjs require ./commonjs [0] ./example.js 2:16-37
amd require ./commonjs [0] ./example.js 7:0-14:1
amd require ./commonjs [0] ./example.js 7:0-14:1
amd require ./commonjs [1] ./amd.js 2:0-12:1
cjs require ./commonjs [1] ./amd.js 7:18-39
amd require ./commonjs [3] ./labeled.js 5:0-11:1
cjs require ./commonjs [3] ./labeled.js 8:18-39
cjs require ./commonjs [0] ./example.js 2:16-37
amd require ./commonjs [0] ./example.js 7:0-14:1
amd require ./commonjs [0] ./example.js 7:0-14:1
[3] ./labeled.js 239 [built] {0}
amd require ./labeled [2] ./commonjs.js 5:0-11:1
cjs require ./labeled [2] ./commonjs.js 9:17-37
amd require ./labeled [1] ./amd.js 2:0-12:1
cjs require ./labeled [1] ./amd.js 8:17-37
cjs require ./labeled [0] ./example.js 4:15-35
labeled require ./labeled [0] ./example.js 17:0-21
amd require ./labeled [0] ./example.js 7:0-14:1
amd require ./labeled [2] ./commonjs.js 5:0-11:1
cjs require ./labeled [2] ./commonjs.js 9:17-37
chunk {1} 1.output.js 439 {0}
[4] ../require.context/templates ^\.\/.*\.js$ 193 [built] {1}
amd require context ../require.context/templates [0] ./example.js 7:0-14:1

View File

@ -27,53 +27,85 @@ require.ensure(["b"], function(require) {
# js/output.js
``` javascript
/******/ (function webpackBootstrap(modules) {
/******/ var installedModules = {};
/******/ var installedChunks = {0:0};
/******/ function require(moduleId) {
/******/ if(installedModules[moduleId])
/******/ return installedModules[moduleId].exports;
/******/ var module = installedModules[moduleId] = {
/******/ exports: {},
/******/ id: moduleId,
/******/ loaded: false
/******/ };
/******/ modules[moduleId].call(null, module, module.exports, require);
/******/ module.loaded = true;
/******/ return module.exports;
/******/ }
/******/ require.e = function requireEnsure(chunkId, callback) {
/******/ if(installedChunks[chunkId] === 0) return callback.call(null, require);
/******/ if(installedChunks[chunkId] !== undefined)
/******/ installedChunks[chunkId].push(callback);
/******/ else {
/******/ installedChunks[chunkId] = [callback];
/******/ var head = document.getElementsByTagName('head')[0];
/******/ var script = document.createElement('script');
/******/ script.type = 'text/javascript';
/******/ script.charset = 'utf-8';
/******/ script.src = modules.c+""+chunkId+".output.js";
/******/ head.appendChild(script);
/******/ }
/******/ };
/******/ require.modules = modules;
/******/ require.cache = installedModules;
/******/ window["webpackJsonp"] = function webpackJsonpCallback(chunkIds, moreModules) {
/******/ var moduleId, chunkId, callbacks = [];
/******/ while(chunkIds.length) {
/******/ chunkId = chunkIds.shift();
/******/ if(installedChunks[chunkId]) callbacks.push.apply(callbacks, installedChunks[chunkId]);
/******/ installedChunks[chunkId] = 0;
/******/ }
/******/ for(moduleId in moreModules)
/******/ modules[moduleId] = moreModules[moduleId];
/******/ while(callbacks.length)
/******/ callbacks.shift().call(null, require);
/******/ };
/******/ return require(0);
/******/ })({
/******/ c: "",
(function(modules) { // webpackBootstrap
// The module cache
var installedModules = {};
// object to store loaded and loading chunks
// "0" means "already loaded"
// Array means "loading", array contains callbacks
var installedChunks = {0:0};
// 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;
}
require.e = function requireEnsure(chunkId, callback) {
// "0" is the signal for "already loaded"
if(installedChunks[chunkId] === 0)
return callback.call(null, require);
// an array means "currently loading".
if(installedChunks[chunkId] !== undefined) {
installedChunks[chunkId].push(callback);
} else {
// start chunk loading
installedChunks[chunkId] = [callback];
var head = document.getElementsByTagName('head')[0];
var script = document.createElement('script');
script.type = 'text/javascript';
script.charset = 'utf-8';
script.src = modules.c + "" + chunkId + ".output.js";
head.appendChild(script);
}
};
require.modules = modules;
require.cache = installedModules;
// install a JSONP callback for chunk loading
window["webpackJsonp"] = function webpackJsonpCallback(chunkIds, moreModules) {
// add "moreModules" to the modules object,
// then flag all "chunkIds" as loaded and fire callback
var moduleId, chunkId, callbacks = [];
while(chunkIds.length) {
chunkId = chunkIds.shift();
if(installedChunks[chunkId])
callbacks.push.apply(callbacks, installedChunks[chunkId]);
installedChunks[chunkId] = 0;
}
for(moduleId in moreModules)
modules[moduleId] = moreModules[moduleId];
while(callbacks.length)
callbacks.shift().call(null, require);
};
// Load entry module and return exports
return require(0);
})
/************************************************************************/
({
// __webpack_public_path__
c: "",
/***/ 0:
/*!********************!*\
!*** ./example.js ***!
@ -112,14 +144,14 @@ require.ensure(["b"], function(require) {
// module a
/***/ }
/******/ })
})
```
# js/1.output.js and js/my own chunk.js
``` javascript
webpackJsonp([1,2], {
webpackJsonp([1,2],
{
/***/ 1:
/*!****************!*\
@ -151,13 +183,15 @@ webpackJsonp([1,2], {
/***/ }
})
}
)
```
# js/2.output.js
``` javascript
webpackJsonp([2], {
webpackJsonp([2],
{
/***/ 1:
/*!****************!*\
@ -179,7 +213,8 @@ webpackJsonp([2], {
/***/ }
})
}
)
```
# Info
@ -187,13 +222,14 @@ webpackJsonp([2], {
## Uncompressed
```
Hash: 53bd38ca579a1775bb08ff04b8a8b963
Time: 46ms
Hash: af380ab476cbefc91864027374dff3e9
Version: webpack 0.10.0-beta1
Time: 59ms
Asset Size Chunks Chunk Names
output.js 2706 0 main
1.output.js 450 1, 2 my own chuck
my own chuck.js 450 1, 2 my own chuck
2.output.js 306 2
output.js 3022 0 main
1.output.js 448 1, 2 my own chuck
my own chuck.js 448 1, 2 my own chuck
2.output.js 305 2
chunk {0} output.js (main) 450
[0] ./example.js 439 [built] {0}
[3] ./~/a.js 11 [built] {0}

View File

@ -25,29 +25,48 @@ module.exports = function() {
# js/output.js
``` javascript
/******/ (function webpackBootstrap(modules) {
/******/ var installedModules = {};
/******/ function require(moduleId) {
/******/ if(installedModules[moduleId])
/******/ return installedModules[moduleId].exports;
/******/ var module = installedModules[moduleId] = {
/******/ exports: {},
/******/ id: moduleId,
/******/ loaded: false
/******/ };
/******/ modules[moduleId].call(null, module, module.exports, require);
/******/ module.loaded = true;
/******/ return module.exports;
/******/ }
/******/ require.e = function requireEnsure(chunkId, callback) {
/******/ callback.call(null, require);
/******/ };
/******/ require.modules = modules;
/******/ require.cache = installedModules;
/******/ return require(0);
/******/ })({
/******/ c: "",
(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;
}
require.e = function requireEnsure(_, callback) {
callback.call(null, require);
};
require.modules = modules;
require.cache = installedModules;
// Load entry module and return exports
return require(0);
})
/************************************************************************/
({
// __webpack_public_path__
c: "",
/***/ 0:
/*!********************!*\
!*** ./example.js ***!
@ -126,8 +145,7 @@ module.exports = function() {
/***/ }
/******/ })
})
```
# Info
@ -135,10 +153,11 @@ module.exports = function() {
## Uncompressed
```
Hash: 7e957458daf8e24487e04864c255e550
Time: 35ms
Hash: 6de61529e12c5c59a06afb519b285fc6
Version: webpack 0.10.0-beta1
Time: 39ms
Asset Size Chunks Chunk Names
output.js 2458 0 main
output.js 2586 0 main
chunk {0} output.js (main) 613
[0] ./example.js 150 [built] {0}
[1] ./templates/a.js 82 [built] {0}
@ -157,8 +176,9 @@ chunk {0} output.js (main) 613
## Minimized (uglify-js, no zip)
```
Hash: 7e957458daf8e24487e04864c255e550
Time: 103ms
Hash: 6de61529e12c5c59a06afb519b285fc6
Version: webpack 0.10.0-beta1
Time: 114ms
Asset Size Chunks Chunk Names
output.js 844 0 main
chunk {0} output.js (main) 613

View File

@ -26,29 +26,48 @@ module.exports = Math.random();
# js/output.js
``` javascript
/******/ (function webpackBootstrap(modules) {
/******/ var installedModules = {};
/******/ function require(moduleId) {
/******/ if(installedModules[moduleId])
/******/ return installedModules[moduleId].exports;
/******/ var module = installedModules[moduleId] = {
/******/ exports: {},
/******/ id: moduleId,
/******/ loaded: false
/******/ };
/******/ modules[moduleId].call(null, module, module.exports, require);
/******/ module.loaded = true;
/******/ return module.exports;
/******/ }
/******/ require.e = function requireEnsure(chunkId, callback) {
/******/ callback.call(null, require);
/******/ };
/******/ require.modules = modules;
/******/ require.cache = installedModules;
/******/ return require(0);
/******/ })({
/******/ c: "",
(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;
}
require.e = function requireEnsure(_, callback) {
callback.call(null, require);
};
require.modules = modules;
require.cache = installedModules;
// Load entry module and return exports
return require(0);
})
/************************************************************************/
({
// __webpack_public_path__
c: "",
/***/ 0:
/*!********************!*\
!*** ./example.js ***!
@ -80,8 +99,7 @@ module.exports = Math.random();
module.exports = Math.random();
/***/ }
/******/ })
})
```
# Info
@ -89,10 +107,11 @@ module.exports = Math.random();
## Uncompressed
```
Hash: d7292c834fe164b92f73e1a3aecfecd1
Time: 26ms
Hash: f180ba3e87e5894643306820cbd115dc
Version: webpack 0.10.0-beta1
Time: 32ms
Asset Size Chunks Chunk Names
output.js 1409 0 main
output.js 1559 0 main
chunk {0} output.js (main) 326
[0] ./example.js 295 [built] {0}
[1] ./a.js 31 [built] {0}
@ -104,8 +123,9 @@ chunk {0} output.js (main) 326
## Minimized (uglify-js, no zip)
```
Hash: d7292c834fe164b92f73e1a3aecfecd1
Time: 70ms
Hash: f180ba3e87e5894643306820cbd115dc
Version: webpack 0.10.0-beta1
Time: 81ms
Asset Size Chunks Chunk Names
output.js 387 0 main
chunk {0} output.js (main) 326

View File

@ -25,29 +25,48 @@ onmessage = function(event) {
# js/output.js
``` javascript
/******/ (function webpackBootstrap(modules) {
/******/ var installedModules = {};
/******/ function require(moduleId) {
/******/ if(installedModules[moduleId])
/******/ return installedModules[moduleId].exports;
/******/ var module = installedModules[moduleId] = {
/******/ exports: {},
/******/ id: moduleId,
/******/ loaded: false
/******/ };
/******/ modules[moduleId].call(null, module, module.exports, require);
/******/ module.loaded = true;
/******/ return module.exports;
/******/ }
/******/ require.e = function requireEnsure(chunkId, callback) {
/******/ callback.call(null, require);
/******/ };
/******/ require.modules = modules;
/******/ require.cache = installedModules;
/******/ return require(0);
/******/ })({
/******/ c: "",
(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;
}
require.e = function requireEnsure(_, callback) {
callback.call(null, require);
};
require.modules = modules;
require.cache = installedModules;
// Load entry module and return exports
return require(0);
})
/************************************************************************/
({
// __webpack_public_path__
c: "",
/***/ 0:
/*!********************!*\
!*** ./example.js ***!
@ -74,45 +93,67 @@ onmessage = function(event) {
};
/***/ }
/******/ })
})
```
# js/[hash].worker.js
``` javascript
/******/ (function webpackBootstrap(modules) {
/******/ var installedModules = {};
/******/ function require(moduleId) {
/******/ if(installedModules[moduleId])
/******/ return installedModules[moduleId].exports;
/******/ var module = installedModules[moduleId] = {
/******/ exports: {},
/******/ id: moduleId,
/******/ loaded: false
/******/ };
/******/ modules[moduleId].call(null, module, module.exports, require);
/******/ module.loaded = true;
/******/ return module.exports;
/******/ }
/******/ require.e = function requireEnsure(chunkId, callback) {
/******/ if(installedChunks[chunkId] === 1) return callback.call(null, require);
/******/ importScripts(""+chunkId+".bundle.js");
/******/ callback.call(null, require);
/******/ };
/******/ require.modules = modules;
/******/ require.cache = installedModules;
/******/ var installedChunks = {0:1};
/******/ this["webpackChunk"] = function webpackChunkCallback(chunkIds, moreModules) {
/******/ for(var moduleId in moreModules)
/******/ modules[moduleId] = moreModules[moduleId];
/******/ for(var i = 0; i < chunkIds.length; i++)
/******/ installedChunks[chunkIds[i]] = 1;
/******/ };
/******/ return require(0);
/******/ })({
/******/ c: "",
(function(modules) { // webpackBootstrap
// The module cache
var installedModules = {};
// object to store loaded chunks
// "1" means "already loaded"
var installedChunks = {0:1};
// 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;
}
require.e = function requireEnsure(chunkId, callback) {
// "1" is the signal for "already loaded"
if(!installedChunks[chunkId]) {
importScripts("" + chunkId + ".hash.worker.js");
}
callback.call(null, require);
};
require.modules = modules;
require.cache = installedModules;
this["webpackChunk"] = function webpackChunkCallback(chunkIds, moreModules) {
for(var moduleId in moreModules)
modules[moduleId] = moreModules[moduleId];
while(chunkIds.length)
installedChunks[chunkIds.pop()] = 1;
};
// Load entry module and return exports
return require(0);
})
/************************************************************************/
({
// __webpack_public_path__
c: "",
/***/ 0:
/*!*******************!*\
!*** ./worker.js ***!
@ -128,14 +169,14 @@ onmessage = function(event) {
/***/ }
/******/ })
})
```
# js/1.[hash].worker.hs
``` javascript
webpackChunk([1], {
webpackChunk([1],
{
/***/ 1:
/*!*********************************************!*\
@ -202,7 +243,8 @@ webpackChunk([1], {
/***/ }
})
}
)
```
# Info
@ -210,21 +252,23 @@ webpackChunk([1], {
## Uncompressed
```
Hash: c7ce795e4c2122d3f175fa426dbb3130
Time: 72ms
Hash: b898016580f5af04be201a389d5bc652
Version: webpack 0.10.0-beta1
Time: 82ms
Asset Size Chunks Chunk Names
hash.worker.js 1711
1.hash.worker.js 1589
output.js 1579 0 main
hash.worker.js 1842
1.hash.worker.js 1567
output.js 1727 0 main
chunk {0} output.js (main) 302
[0] ./example.js 206 [built] {0}
[1] (webpack)/~/worker-loader!./worker.js 96 [not cacheable] [built] {0}
cjs require worker!./worker [0] ./example.js 1:13-39
Child worker:
Hash: ac1f44dac199ee427792d65ff79c83c3
Hash: df2e39abee5b81accea763c727cac801
Version: webpack 0.10.0-beta1
Asset Size Chunks Chunk Names
hash.worker.js 1711 0 main
1.hash.worker.js 1589 1
hash.worker.js 1842 0 main
1.hash.worker.js 1567 1
chunk {0} hash.worker.js (main) 168
[0] ./worker.js 168 [built] {0}
chunk {1} 1.hash.worker.js 463 {0}
@ -244,10 +288,11 @@ Child worker:
## Minimized (uglify-js, no zip)
```
Hash: c7ce795e4c2122d3f175fa426dbb3130
Time: 215ms
Hash: b898016580f5af04be201a389d5bc652
Version: webpack 0.10.0-beta1
Time: 226ms
Asset Size Chunks Chunk Names
hash.worker.js 561
hash.worker.js 519
1.hash.worker.js 531
output.js 418 0 main
chunk {0} output.js (main) 302
@ -255,9 +300,10 @@ chunk {0} output.js (main) 302
[1] (webpack)/~/worker-loader!./worker.js 96 [not cacheable] [built] {0}
cjs require worker!./worker [0] ./example.js 1:13-39
Child worker:
Hash: ac1f44dac199ee427792d65ff79c83c3
Hash: df2e39abee5b81accea763c727cac801
Version: webpack 0.10.0-beta1
Asset Size Chunks Chunk Names
hash.worker.js 561 0 main
hash.worker.js 519 0 main
1.hash.worker.js 531 1
chunk {0} hash.worker.js (main) 168
[0] ./worker.js 168 [built] {0}

View File

@ -1,6 +1,6 @@
{
"name": "webpack",
"version": "0.10.0-beta1",
"version": "0.10.0-beta2",
"author": "Tobias Koppers @sokra",
"description": "Packs CommonJs/AMD/Labeled Modules for the browser. Allows to split your codebase into multiple bundles, which can be loaded on demand. Support loaders to preprocess files, i.e. json, jade, coffee, css, less, ... and your custom stuff.",
"dependencies": {