Skip to content

Commit

Permalink
updated examples
Browse files Browse the repository at this point in the history
  • Loading branch information
sokra committed May 22, 2017
1 parent af05c14 commit 859b8cd
Show file tree
Hide file tree
Showing 38 changed files with 1,304 additions and 1,159 deletions.
16 changes: 8 additions & 8 deletions examples/aggressive-merging/README.md
Expand Up @@ -57,13 +57,13 @@ module.exports = {

```
Hash: 75bcce350a8b5f748873
Version: webpack 2.3.2
Version: webpack 2.6.0
Asset Size Chunks Chunk Names
0.chunk.js 5.76 kB 0 [emitted]
1.chunk.js 401 bytes 1 [emitted]
pageB.bundle.js 6.41 kB 2 [emitted] pageB
pageA.bundle.js 6.38 kB 3 [emitted] pageA
pageC.bundle.js 6.17 kB 4 [emitted] pageC
pageB.bundle.js 6.58 kB 2 [emitted] pageB
pageA.bundle.js 6.55 kB 3 [emitted] pageA
pageC.bundle.js 6.34 kB 4 [emitted] pageC
Entrypoint pageA = pageA.bundle.js
Entrypoint pageB = pageB.bundle.js
Entrypoint pageC = pageC.bundle.js
Expand Down Expand Up @@ -102,13 +102,13 @@ chunk {4} pageC.bundle.js (pageC) 70 bytes [entry] [rendered]

```
Hash: 75bcce350a8b5f748873
Version: webpack 2.3.2
Version: webpack 2.6.0
Asset Size Chunks Chunk Names
0.chunk.js 75 bytes 0 [emitted]
1.chunk.js 78 bytes 1 [emitted]
pageB.bundle.js 1.48 kB 2 [emitted] pageB
pageA.bundle.js 1.48 kB 3 [emitted] pageA
pageC.bundle.js 1.46 kB 4 [emitted] pageC
pageB.bundle.js 1.49 kB 2 [emitted] pageB
pageA.bundle.js 1.49 kB 3 [emitted] pageA
pageC.bundle.js 1.47 kB 4 [emitted] pageC
Entrypoint pageA = pageA.bundle.js
Entrypoint pageB = pageB.bundle.js
Entrypoint pageC = pageC.bundle.js
Expand Down
10 changes: 5 additions & 5 deletions examples/chunkhash/README.md
Expand Up @@ -62,7 +62,7 @@ module.exports = {

<!-- inlined minimized file "manifest.[chunkhash].js" -->
<script>
!function(e){function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}var n=window.webpackJsonp;window.webpackJsonp=function(t,c,u){for(var a,i,f,s=0,l=[];s<t.length;s++)i=t[s],o[i]&&l.push(o[i][0]),o[i]=0;for(a in c)Object.prototype.hasOwnProperty.call(c,a)&&(e[a]=c[a]);for(n&&n(t,c,u);l.length;)l.shift()();if(u)for(s=0;s<u.length;s++)f=r(r.s=u[s]);return f};var t={},o={4:0};r.e=function(e){function n(){u.onerror=u.onload=null,clearTimeout(a);var r=o[e];0!==r&&(r&&r[1](new Error("Loading chunk "+e+" failed.")),o[e]=void 0)}if(0===o[e])return Promise.resolve();if(o[e])return o[e][2];var t=new Promise(function(r,n){o[e]=[r,n]});o[e][2]=t;var c=document.getElementsByTagName("head")[0],u=document.createElement("script");u.type="text/javascript",u.charset="utf-8",u.async=!0,u.timeout=12e4,r.nc&&u.setAttribute("nonce",r.nc),u.src=r.p+""+{0:"d1359b519c10df30787b",1:"06459c375ec851b0e2ae",2:"4d752abc2fcf569f13fc",3:"8d8564a703e7631bff4b"}[e]+".js";var a=setTimeout(n,12e4);return u.onerror=u.onload=n,c.appendChild(u),t},r.m=e,r.c=t,r.i=function(e){return e},r.d=function(e,n,t){r.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:t})},r.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(n,"a",n),n},r.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},r.p="js/",r.oe=function(e){throw console.error(e),e}}([]);
!function(e){function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}var r=window.webpackJsonp;window.webpackJsonp=function(t,c,u){for(var i,a,f,s=0,l=[];s<t.length;s++)a=t[s],o[a]&&l.push(o[a][0]),o[a]=0;for(i in c)Object.prototype.hasOwnProperty.call(c,i)&&(e[i]=c[i]);for(r&&r(t,c,u);l.length;)l.shift()();if(u)for(s=0;s<u.length;s++)f=n(n.s=u[s]);return f};var t={},o={4:0},c=new Promise(function(e){e()});n.e=function(e){function r(){i.onerror=i.onload=null,clearTimeout(a);var n=o[e];0!==n&&(n&&n[1](new Error("Loading chunk "+e+" failed.")),o[e]=void 0)}if(0===o[e])return c;if(o[e])return o[e][2];var t=new Promise(function(n,r){o[e]=[n,r]});o[e][2]=t;var u=document.getElementsByTagName("head")[0],i=document.createElement("script");i.type="text/javascript",i.charset="utf-8",i.async=!0,i.timeout=12e4,n.nc&&i.setAttribute("nonce",n.nc),i.src=n.p+""+{0:"d1359b519c10df30787b",1:"06459c375ec851b0e2ae",2:"4d752abc2fcf569f13fc",3:"8d8564a703e7631bff4b"}[e]+".js";var a=setTimeout(r,12e4);return i.onerror=i.onload=r,u.appendChild(i),t},n.m=e,n.c=t,n.i=function(e){return e},n.d=function(e,r,t){n.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:t})},n.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(r,"a",r),r},n.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},n.p="js/",n.oe=function(e){throw console.error(e),e}}([]);
</script>

<!-- optional when using the CommonChunkPlugin for vendor modules -->
Expand Down Expand Up @@ -144,13 +144,13 @@ __webpack_require__.e/* import() */(0).then(__webpack_require__.bind(null, /*! .

```
Hash: ea635224271deb1b32d9
Version: webpack 2.3.3
Version: webpack 2.6.0
Asset Size Chunks Chunk Names
d1359b519c10df30787b.js 237 bytes 0 [emitted]
06459c375ec851b0e2ae.js 243 bytes 1 [emitted]
common.[chunkhash].js 747 bytes 2 [emitted] common
main.[chunkhash].js 654 bytes 3 [emitted] main
manifest.[chunkhash].js 5.88 kB 4 [emitted] manifest
manifest.[chunkhash].js 6.05 kB 4 [emitted] manifest
Entrypoint main = manifest.[chunkhash].js common.[chunkhash].js main.[chunkhash].js
Entrypoint common = manifest.[chunkhash].js common.[chunkhash].js
chunk {0} d1359b519c10df30787b.js 29 bytes {3} [rendered]
Expand Down Expand Up @@ -178,13 +178,13 @@ chunk {4} manifest.[chunkhash].js (manifest) 0 bytes [entry] [rendered]

```
Hash: ea635224271deb1b32d9
Version: webpack 2.3.3
Version: webpack 2.6.0
Asset Size Chunks Chunk Names
d1359b519c10df30787b.js 38 bytes 0 [emitted]
06459c375ec851b0e2ae.js 37 bytes 1 [emitted]
common.[chunkhash].js 152 bytes 2 [emitted] common
main.[chunkhash].js 166 bytes 3 [emitted] main
manifest.[chunkhash].js 1.48 kB 4 [emitted] manifest
manifest.[chunkhash].js 1.49 kB 4 [emitted] manifest
Entrypoint main = manifest.[chunkhash].js common.[chunkhash].js main.[chunkhash].js
Entrypoint common = manifest.[chunkhash].js common.[chunkhash].js
chunk {0} d1359b519c10df30787b.js 29 bytes {3} [rendered]
Expand Down
20 changes: 10 additions & 10 deletions examples/code-splitted-css-bundle/README.md
Expand Up @@ -66,12 +66,12 @@ body {
## Uncompressed

```
Hash: 921f06e52b5748b2b7f9
Version: webpack 2.3.2
Hash: 2fbd8d3f44d15765df64
Version: webpack 2.6.0
Asset Size Chunks Chunk Names
ce21cbdd9b894e6af794813eb3fdaf60.png 119 bytes [emitted]
0.output.js 2.24 kB 0 [emitted]
output.js 15.5 kB 1 [emitted] main
output.js 15.4 kB 1 [emitted] main
style.css 71 bytes 1 [emitted] main
Entrypoint main = output.js style.css
chunk {0} 0.output.js 1.25 kB {1} [rendered]
Expand All @@ -84,15 +84,15 @@ chunk {0} 0.output.js 1.25 kB {1} [rendered]
cjs require ./style2.css [1] ./chunk.js 1:0-23
[7] ./image2.png 82 bytes {0} [built]
cjs require ./image2.png [5] (webpack)/~/css-loader!./style2.css 6:58-81
chunk {1} output.js, style.css (main) 8.75 kB [entry] [rendered]
chunk {1} output.js, style.css (main) 8.5 kB [entry] [rendered]
> main [2] ./example.js
[0] ./style.css 41 bytes {1} [built]
cjs require ./style.css [2] ./example.js 1:0-22
[2] ./example.js 48 bytes {1} [built]
[3] (webpack)/~/css-loader/lib/css-base.js 1.51 kB {1} [built]
cjs require ../../node_modules/css-loader/lib/css-base.js [5] (webpack)/~/css-loader!./style2.css 1:27-83
cjs require ../../node_modules/css-loader/lib/css-base.js [8] (webpack)/~/css-loader!./style.css 1:27-83
[4] (webpack)/~/style-loader/addStyles.js 7.15 kB {1} [built]
[4] (webpack)/~/style-loader/addStyles.js 6.91 kB {1} [built]
cjs require !../../node_modules/style-loader/addStyles.js [6] ./style2.css 7:13-69
Child extract-text-webpack-plugin:
Entrypoint undefined = extract-text-webpack-plugin-output-filename
Expand All @@ -108,12 +108,12 @@ Child extract-text-webpack-plugin:
## Minimized (uglify-js, no zip)

```
Hash: b832c58ce5b88806634b
Version: webpack 2.3.2
Hash: 4571a05f1dfd87276cbb
Version: webpack 2.6.0
Asset Size Chunks Chunk Names
ce21cbdd9b894e6af794813eb3fdaf60.png 119 bytes [emitted]
0.output.js 309 bytes 0 [emitted]
output.js 5.02 kB 1 [emitted] main
output.js 5.03 kB 1 [emitted] main
style.css 61 bytes 1 [emitted] main
Entrypoint main = output.js style.css
chunk {0} 0.output.js 1.23 kB {1} [rendered]
Expand All @@ -126,15 +126,15 @@ chunk {0} 0.output.js 1.23 kB {1} [rendered]
cjs require ./style2.css [1] ./chunk.js 1:0-23
[7] ./image2.png 82 bytes {0} [built]
cjs require ./image2.png [5] (webpack)/~/css-loader!./style2.css 6:50-73
chunk {1} output.js, style.css (main) 8.75 kB [entry] [rendered]
chunk {1} output.js, style.css (main) 8.5 kB [entry] [rendered]
> main [2] ./example.js
[0] ./style.css 41 bytes {1} [built]
cjs require ./style.css [2] ./example.js 1:0-22
[2] ./example.js 48 bytes {1} [built]
[3] (webpack)/~/css-loader/lib/css-base.js 1.51 kB {1} [built]
cjs require ../../node_modules/css-loader/lib/css-base.js [5] (webpack)/~/css-loader!./style2.css 1:27-83
cjs require ../../node_modules/css-loader/lib/css-base.js [8] (webpack)/~/css-loader!./style.css 1:27-83
[4] (webpack)/~/style-loader/addStyles.js 7.15 kB {1} [built]
[4] (webpack)/~/style-loader/addStyles.js 6.91 kB {1} [built]
cjs require !../../node_modules/style-loader/addStyles.js [6] ./style2.css 7:13-69
Child extract-text-webpack-plugin:
Entrypoint undefined = extract-text-webpack-plugin-output-filename
Expand Down
29 changes: 18 additions & 11 deletions examples/code-splitted-require.context-amd/README.md
Expand Up @@ -28,8 +28,9 @@ getTemplate("b", function(b) {
/******/ var moduleId, chunkId, i = 0, resolves = [], result;
/******/ for(;i < chunkIds.length; i++) {
/******/ chunkId = chunkIds[i];
/******/ if(installedChunks[chunkId])
/******/ if(installedChunks[chunkId]) {
/******/ resolves.push(installedChunks[chunkId][0]);
/******/ }
/******/ installedChunks[chunkId] = 0;
/******/ }
/******/ for(moduleId in moreModules) {
Expand All @@ -38,8 +39,9 @@ getTemplate("b", function(b) {
/******/ }
/******/ }
/******/ if(parentJsonpFunction) parentJsonpFunction(chunkIds, moreModules, executeModules);
/******/ while(resolves.length)
/******/ while(resolves.length) {
/******/ resolves.shift()();
/******/ }
/******/
/******/ };
/******/
Expand All @@ -51,13 +53,15 @@ getTemplate("b", function(b) {
/******/ 1: 0
/******/ };
/******/
/******/ var resolvedPromise = new Promise(function(resolve) { resolve(); });
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId])
/******/ if(installedModules[moduleId]) {
/******/ return installedModules[moduleId].exports;
/******/
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules[moduleId] = {
/******/ i: moduleId,
Expand All @@ -78,8 +82,9 @@ getTemplate("b", function(b) {
/******/ // This file contains only the entry chunk.
/******/ // The chunk loading function for additional chunks
/******/ __webpack_require__.e = function requireEnsure(chunkId) {
/******/ if(installedChunks[chunkId] === 0)
/******/ return Promise.resolve();
/******/ if(installedChunks[chunkId] === 0) {
/******/ return resolvedPromise;
/******/ }
/******/
/******/ // a Promise means "currently loading".
/******/ if(installedChunks[chunkId]) {
Expand Down Expand Up @@ -112,7 +117,9 @@ getTemplate("b", function(b) {
/******/ clearTimeout(timeout);
/******/ var chunk = installedChunks[chunkId];
/******/ if(chunk !== 0) {
/******/ if(chunk) chunk[1](new Error('Loading chunk ' + chunkId + ' failed.'));
/******/ if(chunk) {
/******/ chunk[1](new Error('Loading chunk ' + chunkId + ' failed.'));
/******/ }
/******/ installedChunks[chunkId] = undefined;
/******/ }
/******/ };
Expand Down Expand Up @@ -279,10 +286,10 @@ module.exports = function() {

```
Hash: 1c46bbe47e8b8a0ee8e2
Version: webpack 2.3.2
Version: webpack 2.6.0
Asset Size Chunks Chunk Names
0.output.js 1.85 kB 0 [emitted]
output.js 6.36 kB 1 [emitted] main
output.js 6.53 kB 1 [emitted] main
Entrypoint main = output.js
chunk {0} 0.output.js 463 bytes {1} [rendered]
> [0] ./example.js 2:1-4:3
Expand All @@ -306,10 +313,10 @@ chunk {1} output.js (main) 261 bytes [entry] [rendered]

```
Hash: 1c46bbe47e8b8a0ee8e2
Version: webpack 2.3.2
Version: webpack 2.6.0
Asset Size Chunks Chunk Names
0.output.js 544 bytes 0 [emitted]
output.js 1.54 kB 1 [emitted] main
output.js 1.55 kB 1 [emitted] main
Entrypoint main = output.js
chunk {0} 0.output.js 463 bytes {1} [rendered]
> [0] ./example.js 2:1-4:3
Expand Down
29 changes: 18 additions & 11 deletions examples/code-splitted-require.context/README.md
Expand Up @@ -28,8 +28,9 @@ getTemplate("b", function(b) {
/******/ var moduleId, chunkId, i = 0, resolves = [], result;
/******/ for(;i < chunkIds.length; i++) {
/******/ chunkId = chunkIds[i];
/******/ if(installedChunks[chunkId])
/******/ if(installedChunks[chunkId]) {
/******/ resolves.push(installedChunks[chunkId][0]);
/******/ }
/******/ installedChunks[chunkId] = 0;
/******/ }
/******/ for(moduleId in moreModules) {
Expand All @@ -38,8 +39,9 @@ getTemplate("b", function(b) {
/******/ }
/******/ }
/******/ if(parentJsonpFunction) parentJsonpFunction(chunkIds, moreModules, executeModules);
/******/ while(resolves.length)
/******/ while(resolves.length) {
/******/ resolves.shift()();
/******/ }
/******/
/******/ };
/******/
Expand All @@ -51,13 +53,15 @@ getTemplate("b", function(b) {
/******/ 1: 0
/******/ };
/******/
/******/ var resolvedPromise = new Promise(function(resolve) { resolve(); });
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId])
/******/ if(installedModules[moduleId]) {
/******/ return installedModules[moduleId].exports;
/******/
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules[moduleId] = {
/******/ i: moduleId,
Expand All @@ -78,8 +82,9 @@ getTemplate("b", function(b) {
/******/ // This file contains only the entry chunk.
/******/ // The chunk loading function for additional chunks
/******/ __webpack_require__.e = function requireEnsure(chunkId) {
/******/ if(installedChunks[chunkId] === 0)
/******/ return Promise.resolve();
/******/ if(installedChunks[chunkId] === 0) {
/******/ return resolvedPromise;
/******/ }
/******/
/******/ // a Promise means "currently loading".
/******/ if(installedChunks[chunkId]) {
Expand Down Expand Up @@ -112,7 +117,9 @@ getTemplate("b", function(b) {
/******/ clearTimeout(timeout);
/******/ var chunk = installedChunks[chunkId];
/******/ if(chunk !== 0) {
/******/ if(chunk) chunk[1](new Error('Loading chunk ' + chunkId + ' failed.'));
/******/ if(chunk) {
/******/ chunk[1](new Error('Loading chunk ' + chunkId + ' failed.'));
/******/ }
/******/ installedChunks[chunkId] = undefined;
/******/ }
/******/ };
Expand Down Expand Up @@ -279,10 +286,10 @@ module.exports = function() {

```
Hash: f67ab883501eec17d2fb
Version: webpack 2.3.2
Version: webpack 2.6.0
Asset Size Chunks Chunk Names
0.output.js 1.85 kB 0 [emitted]
output.js 6.3 kB 1 [emitted] main
output.js 6.46 kB 1 [emitted] main
Entrypoint main = output.js
chunk {0} 0.output.js 463 bytes {1} [rendered]
> [0] ./example.js 2:1-4:3
Expand All @@ -306,10 +313,10 @@ chunk {1} output.js (main) 276 bytes [entry] [rendered]

```
Hash: f67ab883501eec17d2fb
Version: webpack 2.3.2
Version: webpack 2.6.0
Asset Size Chunks Chunk Names
0.output.js 544 bytes 0 [emitted]
output.js 1.51 kB 1 [emitted] main
output.js 1.52 kB 1 [emitted] main
Entrypoint main = output.js
chunk {0} 0.output.js 463 bytes {1} [rendered]
> [0] ./example.js 2:1-4:3
Expand Down

0 comments on commit 859b8cd

Please sign in to comment.