Skip to content

Commit 5862329

Browse files
committed
updated some examples
1 parent 0eb5b20 commit 5862329

File tree

33 files changed

+1889
-1786
lines changed

33 files changed

+1889
-1786
lines changed

examples/agressive-merging/README.md

Lines changed: 70 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -56,87 +56,87 @@ module.exports = {
5656
## Uncompressed
5757

5858
```
59-
Hash: f4216735227bfe40c743
60-
Version: webpack 1.9.10
61-
Time: 89ms
59+
Hash: 042a9d90b141419e1b34
60+
Version: webpack 2.0.6-beta
61+
Time: 112ms
6262
Asset Size Chunks Chunk Names
63-
pageA.bundle.js 4.05 kB 0 [emitted] pageA
64-
1.chunk.js 5.72 kB 1 [emitted]
65-
pageB.bundle.js 4.08 kB 2 [emitted] pageB
66-
pageC.bundle.js 3.9 kB 3 [emitted] pageC
67-
4.chunk.js 309 bytes 4 [emitted]
68-
chunk {0} pageA.bundle.js (pageA) 92 bytes [rendered]
69-
> pageA [0] ./pageA.js
70-
[0] ./pageA.js 71 bytes {0} [built]
71-
[2] ./a.js 21 bytes {0} {4} [built]
72-
cjs require ./a [0] ./pageA.js 2:8-22
73-
amd require ./a [0] ./pageC.js 1:0-3:2
74-
chunk {1} 1.chunk.js 5.55 kB {0} {2} [rendered]
75-
> [0] ./pageA.js 1:0-3:2
76-
> aggressive-merge [0] ./pageB.js 1:0-3:2
77-
[1] ./common.js 5.55 kB {1} [built]
78-
amd require ./common [0] ./pageB.js 1:0-3:2
79-
amd require ./common [0] ./pageA.js 1:0-3:2
80-
chunk {2} pageB.bundle.js (pageB) 92 bytes [rendered]
81-
> pageB [0] ./pageB.js
82-
[0] ./pageB.js 71 bytes {2} [built]
83-
[3] ./b.js 21 bytes {2} {4} [built]
84-
cjs require ./b [0] ./pageB.js 2:8-22
85-
cjs require ./b [0] ./pageC.js 2:17-31
86-
chunk {3} pageC.bundle.js (pageC) 70 bytes [rendered]
87-
> pageC [0] ./pageC.js
88-
[0] ./pageC.js 70 bytes {3} [built]
89-
chunk {4} 4.chunk.js 42 bytes {3} [rendered]
90-
> [0] ./pageC.js 1:0-3:2
91-
[2] ./a.js 21 bytes {0} {4} [built]
92-
cjs require ./a [0] ./pageA.js 2:8-22
93-
amd require ./a [0] ./pageC.js 1:0-3:2
94-
[3] ./b.js 21 bytes {2} {4} [built]
95-
cjs require ./b [0] ./pageB.js 2:8-22
96-
cjs require ./b [0] ./pageC.js 2:17-31
63+
0.chunk.js 5.72 kB 0 [emitted]
64+
pageB.bundle.js 4.72 kB 1 [emitted] pageB
65+
pageA.bundle.js 4.68 kB 2 [emitted] pageA
66+
3.chunk.js 291 bytes 3 [emitted]
67+
pageC.bundle.js 4.53 kB 4 [emitted] pageC
68+
chunk {0} 0.chunk.js 5.55 kB {2} {1} [rendered]
69+
> [3] ./pageA.js 1:0-3:2
70+
> aggressive-merge [4] ./pageB.js 1:0-3:2
71+
[2] ./common.js 5.55 kB {0} [built]
72+
amd require ./common [3] ./pageA.js 1:0-3:2
73+
amd require ./common [4] ./pageB.js 1:0-3:2
74+
chunk {1} pageB.bundle.js (pageB) 92 bytes [rendered]
75+
> pageB [4] ./pageB.js
76+
[1] ./b.js 21 bytes {1} {3} [built]
77+
cjs require ./b [4] ./pageB.js 2:8-22
78+
cjs require ./b [5] ./pageC.js 2:17-31
79+
[4] ./pageB.js 71 bytes {1} [built]
80+
chunk {2} pageA.bundle.js (pageA) 92 bytes [rendered]
81+
> pageA [3] ./pageA.js
82+
[0] ./a.js 21 bytes {2} {3} [built]
83+
cjs require ./a [3] ./pageA.js 2:8-22
84+
amd require ./a [5] ./pageC.js 1:0-3:2
85+
[3] ./pageA.js 71 bytes {2} [built]
86+
chunk {3} 3.chunk.js 42 bytes {4} [rendered]
87+
> [5] ./pageC.js 1:0-3:2
88+
[0] ./a.js 21 bytes {2} {3} [built]
89+
cjs require ./a [3] ./pageA.js 2:8-22
90+
amd require ./a [5] ./pageC.js 1:0-3:2
91+
[1] ./b.js 21 bytes {1} {3} [built]
92+
cjs require ./b [4] ./pageB.js 2:8-22
93+
cjs require ./b [5] ./pageC.js 2:17-31
94+
chunk {4} pageC.bundle.js (pageC) 70 bytes [rendered]
95+
> pageC [5] ./pageC.js
96+
[5] ./pageC.js 70 bytes {4} [built]
9797
```
9898

9999
## Minimized (uglify-js, no zip)
100100

101101
```
102-
Hash: 94cc89f2c74586df40ca
103-
Version: webpack 1.9.10
104-
Time: 328ms
105-
Asset Size Chunks Chunk Names
106-
0.chunk.js 75 bytes 0 [emitted]
107-
pageB.bundle.js 814 bytes 1 [emitted] pageB
108-
pageA.bundle.js 813 bytes 2 [emitted] pageA
109-
3.chunk.js 79 bytes 3 [emitted]
110-
pageC.bundle.js 796 bytes 4 [emitted] pageC
102+
Hash: 042a9d90b141419e1b34
103+
Version: webpack 2.0.6-beta
104+
Time: 565ms
105+
Asset Size Chunks Chunk Names
106+
0.chunk.js 75 bytes 0 [emitted]
107+
pageB.bundle.js 1.1 kB 1 [emitted] pageB
108+
pageA.bundle.js 1.1 kB 2 [emitted] pageA
109+
3.chunk.js 78 bytes 3 [emitted]
110+
pageC.bundle.js 1.09 kB 4 [emitted] pageC
111111
chunk {0} 0.chunk.js 5.55 kB {2} {1} [rendered]
112-
> [0] ./pageA.js 1:0-3:2
113-
> aggressive-merge [0] ./pageB.js 1:0-3:2
114-
[3] ./common.js 5.55 kB {0} [built]
115-
amd require ./common [0] ./pageA.js 1:0-3:2
116-
amd require ./common [0] ./pageB.js 1:0-3:2
112+
> [3] ./pageA.js 1:0-3:2
113+
> aggressive-merge [4] ./pageB.js 1:0-3:2
114+
[2] ./common.js 5.55 kB {0} [built]
115+
amd require ./common [3] ./pageA.js 1:0-3:2
116+
amd require ./common [4] ./pageB.js 1:0-3:2
117117
chunk {1} pageB.bundle.js (pageB) 92 bytes [rendered]
118-
> pageB [0] ./pageB.js
119-
[0] ./pageB.js 71 bytes {1} [built]
120-
[2] ./b.js 21 bytes {1} {3} [built]
121-
cjs require ./b [0] ./pageB.js 2:8-22
122-
cjs require ./b [0] ./pageC.js 2:17-31
118+
> pageB [4] ./pageB.js
119+
[1] ./b.js 21 bytes {1} {3} [built]
120+
cjs require ./b [4] ./pageB.js 2:8-22
121+
cjs require ./b [5] ./pageC.js 2:17-31
122+
[4] ./pageB.js 71 bytes {1} [built]
123123
chunk {2} pageA.bundle.js (pageA) 92 bytes [rendered]
124-
> pageA [0] ./pageA.js
125-
[0] ./pageA.js 71 bytes {2} [built]
126-
[1] ./a.js 21 bytes {2} {3} [built]
127-
cjs require ./a [0] ./pageA.js 2:8-22
128-
amd require ./a [0] ./pageC.js 1:0-3:2
124+
> pageA [3] ./pageA.js
125+
[0] ./a.js 21 bytes {2} {3} [built]
126+
cjs require ./a [3] ./pageA.js 2:8-22
127+
amd require ./a [5] ./pageC.js 1:0-3:2
128+
[3] ./pageA.js 71 bytes {2} [built]
129129
chunk {3} 3.chunk.js 42 bytes {4} [rendered]
130-
> [0] ./pageC.js 1:0-3:2
131-
[1] ./a.js 21 bytes {2} {3} [built]
132-
cjs require ./a [0] ./pageA.js 2:8-22
133-
amd require ./a [0] ./pageC.js 1:0-3:2
134-
[2] ./b.js 21 bytes {1} {3} [built]
135-
cjs require ./b [0] ./pageB.js 2:8-22
136-
cjs require ./b [0] ./pageC.js 2:17-31
130+
> [5] ./pageC.js 1:0-3:2
131+
[0] ./a.js 21 bytes {2} {3} [built]
132+
cjs require ./a [3] ./pageA.js 2:8-22
133+
amd require ./a [5] ./pageC.js 1:0-3:2
134+
[1] ./b.js 21 bytes {1} {3} [built]
135+
cjs require ./b [4] ./pageB.js 2:8-22
136+
cjs require ./b [5] ./pageC.js 2:17-31
137137
chunk {4} pageC.bundle.js (pageC) 70 bytes [rendered]
138-
> pageC [0] ./pageC.js
139-
[0] ./pageC.js 70 bytes {4} [built]
138+
> pageC [5] ./pageC.js
139+
[5] ./pageC.js 70 bytes {4} [built]
140140
141141
WARNING in 0.chunk.js from UglifyJs
142142
Dropping unused variable justToBeABigFile [./common.js:4,0]

examples/chunkhash/README.md

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ module.exports = {
6262

6363
<!-- inlined minimized file "manifest.[chunkhash].js" -->
6464
<script>
65-
!function(e){function r(o){if(n[o])return n[o].exports;var t=n[o]={exports:{},id:o,loaded:!1};return e[o].call(t.exports,t,t.exports,r),t.loaded=!0,t.exports}var o=window.webpackJsonp;window.webpackJsonp=function(n,a,i){for(var d,c,f=0,u=[];f<n.length;f++)c=n[f],t[c]&&u.push(t[c][0]),t[c]=0;for(d in a)e[d]=a[d];for(o&&o(n,a);u.length;)u.shift()();return i+1?r(i):void 0};var n={},t={2:0};r.e=function(e){function o(){a.onerror=a.onload=null,clearTimeout(i);var r=t[e];0!==r&&(r&&r[1](new Error("Loading chunk "+e+" failed.")),t[e]=void 0)}if(0===t[e])return Promise.resolve();if(t[e])return t[e][2];var n=document.getElementsByTagName("head")[0],a=document.createElement("script");a.type="text/javascript",a.charset="utf-8",a.async=!0,a.timeout=12e4,a.src=r.p+""+{0:"16274d569fd1e7a2eda7",1:"509642492f90d26144b5",3:"9876f9ef706cd5c5f139",4:"7b8badb0178210fedc90"}[e]+".js";var i=setTimeout(o,12e4);a.onerror=a.onload=o,n.appendChild(a);var d=new Promise(function(r,o){t[e]=[r,o]});return t[e][2]=d},r.m=e,r.c=n,r.oe=function(e){throw e},r.p="js/"}([]);
65+
!function(e){function r(o){if(n[o])return n[o].exports;var t=n[o]={exports:{},id:o,loaded:!1};return e[o].call(t.exports,t,t.exports,r),t.loaded=!0,t.exports}var o=window.webpackJsonp;window.webpackJsonp=function(n,a,c){for(var i,d,f=0,u=[];f<n.length;f++)d=n[f],t[d]&&u.push(t[d][0]),t[d]=0;for(i in a)e[i]=a[i];for(o&&o(n,a);u.length;)u.shift()();return c+1?r(c):void 0};var n={},t={2:0};r.e=function(e){function o(){a.onerror=a.onload=null,clearTimeout(c);var r=t[e];0!==r&&(r&&r[1](new Error("Loading chunk "+e+" failed.")),t[e]=void 0)}if(0===t[e])return Promise.resolve();if(t[e])return t[e][2];var n=document.getElementsByTagName("head")[0],a=document.createElement("script");a.type="text/javascript",a.charset="utf-8",a.async=!0,a.timeout=12e4,a.src=r.p+""+{0:"27ffa809c94fb1e509c5",1:"8925d45ed07a265d4246",3:"f2764945b8b62e30c662",4:"bcb99dbc93c7f755b2df"}[e]+".js";var c=setTimeout(o,12e4);a.onerror=a.onload=o,n.appendChild(a);var i=new Promise(function(r,o){t[e]=[r,o]});return t[e][2]=i},r.m=e,r.c=n,r.oe=function(e){throw e},r.p="js/"}([]);
6666
</script>
6767

6868
<!-- optional when using the CommonChunkPlugin for vendor modules -->
@@ -133,23 +133,23 @@ webpackJsonp([4,2],{
133133
## Uncompressed
134134

135135
```
136-
Hash: 223f819918db476ed5ff
137-
Version: webpack 2.0.0-beta
138-
Time: 130ms
136+
Hash: e8b4a7834dca40744042
137+
Version: webpack 2.0.6-beta
138+
Time: 91ms
139139
Asset Size Chunks Chunk Names
140-
16274d569fd1e7a2eda7.js 184 bytes 0, 2 [emitted]
141-
509642492f90d26144b5.js 190 bytes 1, 2 [emitted]
140+
27ffa809c94fb1e509c5.js 184 bytes 0, 2 [emitted]
141+
8925d45ed07a265d4246.js 190 bytes 1, 2 [emitted]
142142
manifest.chunkhash.js 4.2 kB 2 [emitted] manifest
143143
common.chunkhash.js 517 bytes 3, 2 [emitted] common
144144
main.chunkhash.js 513 bytes 4, 2 [emitted] main
145-
chunk {0} 16274d569fd1e7a2eda7.js 29 bytes {4} [rendered]
145+
chunk {0} 27ffa809c94fb1e509c5.js 29 bytes {4} [rendered]
146146
> [3] ./example.js 4:0-25
147147
[2] ./async2.js 29 bytes {0} [built]
148-
./async2 [3] ./example.js 4:0-25
149-
chunk {1} 509642492f90d26144b5.js 29 bytes {4} [rendered]
148+
System.import ./async2 [3] ./example.js 4:0-25
149+
chunk {1} 8925d45ed07a265d4246.js 29 bytes {4} [rendered]
150150
> [3] ./example.js 3:0-25
151151
[1] ./async1.js 29 bytes {1} [built]
152-
./async1 [3] ./example.js 3:0-25
152+
System.import ./async1 [3] ./example.js 3:0-25
153153
chunk {2} manifest.chunkhash.js (manifest) 0 bytes [rendered]
154154
chunk {3} common.chunkhash.js (common) 97 bytes {2} [rendered]
155155
> common [4] multi common
@@ -165,23 +165,23 @@ chunk {4} main.chunkhash.js (main) 104 bytes {3} [rendered]
165165
## Minimized (uglify-js, no zip)
166166

167167
```
168-
Hash: 223f819918db476ed5ff
169-
Version: webpack 2.0.0-beta
170-
Time: 317ms
168+
Hash: e8b4a7834dca40744042
169+
Version: webpack 2.0.6-beta
170+
Time: 231ms
171171
Asset Size Chunks Chunk Names
172-
16274d569fd1e7a2eda7.js 40 bytes 0, 2 [emitted]
173-
509642492f90d26144b5.js 39 bytes 1, 2 [emitted]
172+
27ffa809c94fb1e509c5.js 40 bytes 0, 2 [emitted]
173+
8925d45ed07a265d4246.js 39 bytes 1, 2 [emitted]
174174
manifest.chunkhash.js 1.05 kB 2 [emitted] manifest
175175
common.chunkhash.js 95 bytes 3, 2 [emitted] common
176176
main.chunkhash.js 106 bytes 4, 2 [emitted] main
177-
chunk {0} 16274d569fd1e7a2eda7.js 29 bytes {4} [rendered]
177+
chunk {0} 27ffa809c94fb1e509c5.js 29 bytes {4} [rendered]
178178
> [3] ./example.js 4:0-25
179179
[2] ./async2.js 29 bytes {0} [built]
180-
./async2 [3] ./example.js 4:0-25
181-
chunk {1} 509642492f90d26144b5.js 29 bytes {4} [rendered]
180+
System.import ./async2 [3] ./example.js 4:0-25
181+
chunk {1} 8925d45ed07a265d4246.js 29 bytes {4} [rendered]
182182
> [3] ./example.js 3:0-25
183183
[1] ./async1.js 29 bytes {1} [built]
184-
./async1 [3] ./example.js 3:0-25
184+
System.import ./async1 [3] ./example.js 3:0-25
185185
chunk {2} manifest.chunkhash.js (manifest) 0 bytes [rendered]
186186
chunk {3} common.chunkhash.js (common) 97 bytes {2} [rendered]
187187
> common [4] multi common

0 commit comments

Comments
 (0)