Skip to content

Commit 796ba56

Browse files
authored
Merge pull request webpack#4600 from webpack/example/gfm-fix
Edit Fix GFM rendering issues in examples
2 parents 665b773 + 3b7e8d2 commit 796ba56

40 files changed

Lines changed: 2455 additions & 2336 deletions

File tree

‎examples/aggressive-merging/README.md‎

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -48,22 +48,22 @@ module.exports = {
4848
moveToParents: true
4949
})
5050
]
51-
}
51+
};
5252
```
5353

5454
# Info
5555

5656
## Uncompressed
5757

5858
```
59-
Hash: 06f18f1663d1b6555aff
60-
Version: webpack 2.2.0-rc.2
59+
Hash: 75bcce350a8b5f748873
60+
Version: webpack 2.3.2
6161
Asset Size Chunks Chunk Names
6262
0.chunk.js 5.76 kB 0 [emitted]
63-
1.chunk.js 397 bytes 1 [emitted]
64-
pageB.bundle.js 6.17 kB 2 [emitted] pageB
65-
pageA.bundle.js 6.14 kB 3 [emitted] pageA
66-
pageC.bundle.js 5.94 kB 4 [emitted] pageC
63+
1.chunk.js 401 bytes 1 [emitted]
64+
pageB.bundle.js 6.41 kB 2 [emitted] pageB
65+
pageA.bundle.js 6.38 kB 3 [emitted] pageA
66+
pageC.bundle.js 6.17 kB 4 [emitted] pageC
6767
Entrypoint pageA = pageA.bundle.js
6868
Entrypoint pageB = pageB.bundle.js
6969
Entrypoint pageC = pageC.bundle.js
@@ -101,8 +101,8 @@ chunk {4} pageC.bundle.js (pageC) 70 bytes [entry] [rendered]
101101
## Minimized (uglify-js, no zip)
102102

103103
```
104-
Hash: 06f18f1663d1b6555aff
105-
Version: webpack 2.2.0-rc.2
104+
Hash: 75bcce350a8b5f748873
105+
Version: webpack 2.3.2
106106
Asset Size Chunks Chunk Names
107107
0.chunk.js 75 bytes 0 [emitted]
108108
1.chunk.js 78 bytes 1 [emitted]

‎examples/chunkhash/README.md‎

Lines changed: 32 additions & 32 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(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,a){for(var u,i,f,s=0,d=[];s<t.length;s++)i=t[s],o[i]&&d.push(o[i][0]),o[i]=0;for(u in c)Object.prototype.hasOwnProperty.call(c,u)&&(e[u]=c[u]);for(n&&n(t,c,a);d.length;)d.shift()();if(a)for(s=0;s<a.length;s++)f=r(r.s=a[s]);return f};var t={},o={4:0};r.e=function(e){function n(){c.onerror=c.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=document.getElementsByTagName("head")[0],c=document.createElement("script");c.type="text/javascript",c.charset="utf-8",c.async=!0,c.timeout=12e4,r.nc&&c.setAttribute("nonce",r.nc),c.src=r.p+""+{0:"ecd2b16a48d8b92daf31",1:"3ab6307df46b05a2e3c3",2:"0910ffec005965d55bfb",3:"7e3d3299e6c5c1defd1d"}[e]+".js";var a=setTimeout(n,12e4);c.onerror=c.onload=n;var u=new Promise(function(r,n){o[e]=[r,n]});return o[e][2]=u,t.appendChild(c),u},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}}([]);
65+
!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}}([]);
6666
</script>
6767

6868
<!-- optional when using the CommonChunkPlugin for vendor modules -->
@@ -77,7 +77,7 @@ module.exports = {
7777
# js/common.[chunkhash].js
7878

7979
``` javascript
80-
webpackJsonp([2,4],[
80+
webpackJsonp([2],[
8181
/* 0 */
8282
/* exports provided: default */
8383
/* all exports used */
@@ -114,7 +114,7 @@ module.exports = __webpack_require__(/*! ./vendor */0);
114114
# js/main.[chunkhash].js
115115

116116
``` javascript
117-
webpackJsonp([3,4],{
117+
webpackJsonp([3],{
118118

119119
/***/ 3:
120120
/* unknown exports provided */
@@ -143,67 +143,67 @@ __webpack_require__.e/* import() */(0).then(__webpack_require__.bind(null, /*! .
143143
## Uncompressed
144144

145145
```
146-
Hash: 4e82450959815ca9c86c
147-
Version: webpack 2.2.1
146+
Hash: ea635224271deb1b32d9
147+
Version: webpack 2.3.2
148148
Asset Size Chunks Chunk Names
149-
ecd2b16a48d8b92daf31.js 238 bytes 0, 4 [emitted]
150-
3ab6307df46b05a2e3c3.js 244 bytes 1, 4 [emitted]
151-
common.chunkhash.js 747 bytes 2, 4 [emitted] common
152-
main.chunkhash.js 652 bytes 3, 4 [emitted] main
153-
manifest.chunkhash.js 5.66 kB 4 [emitted] manifest
149+
d1359b519c10df30787b.js 237 bytes 0 [emitted]
150+
06459c375ec851b0e2ae.js 243 bytes 1 [emitted]
151+
common.chunkhash.js 747 bytes 2 [emitted] common
152+
main.chunkhash.js 654 bytes 3 [emitted] main
153+
manifest.chunkhash.js 5.88 kB 4 [emitted] manifest
154154
Entrypoint main = manifest.chunkhash.js common.chunkhash.js main.chunkhash.js
155155
Entrypoint common = manifest.chunkhash.js common.chunkhash.js
156-
chunk {0} ecd2b16a48d8b92daf31.js 28 bytes {3} [rendered]
156+
chunk {0} d1359b519c10df30787b.js 29 bytes {3} [rendered]
157157
> [3] ./example.js 4:0-18
158-
[2] ./async2.js 28 bytes {0} [built]
158+
[2] ./async2.js 29 bytes {0} [built]
159159
import() ./async2 [3] ./example.js 4:0-18
160-
chunk {1} 3ab6307df46b05a2e3c3.js 28 bytes {3} [rendered]
160+
chunk {1} 06459c375ec851b0e2ae.js 29 bytes {3} [rendered]
161161
> [3] ./example.js 3:0-18
162-
[1] ./async1.js 28 bytes {1} [built]
162+
[1] ./async1.js 29 bytes {1} [built]
163163
import() ./async1 [3] ./example.js 3:0-18
164-
chunk {2} common.chunkhash.js (common) 95 bytes {4} [initial] [rendered]
164+
chunk {2} common.chunkhash.js (common) 97 bytes {4} [initial] [rendered]
165165
> common [4] multi ./vendor
166-
[0] ./vendor.js 67 bytes {2} [built]
166+
[0] ./vendor.js 69 bytes {2} [built]
167167
[exports: default]
168168
harmony import ./vendor [3] ./example.js 1:0-30
169169
single entry ./vendor [4] multi ./vendor common:100000
170170
[4] multi ./vendor 28 bytes {2} [built]
171-
chunk {3} main.chunkhash.js (main) 86 bytes {2} [initial] [rendered]
171+
chunk {3} main.chunkhash.js (main) 90 bytes {2} [initial] [rendered]
172172
> main [3] ./example.js
173-
[3] ./example.js 86 bytes {3} [built]
173+
[3] ./example.js 90 bytes {3} [built]
174174
chunk {4} manifest.chunkhash.js (manifest) 0 bytes [entry] [rendered]
175175
```
176176

177177
## Minimized (uglify-js, no zip)
178178

179179
```
180-
Hash: 4e82450959815ca9c86c
181-
Version: webpack 2.2.1
180+
Hash: ea635224271deb1b32d9
181+
Version: webpack 2.3.2
182182
Asset Size Chunks Chunk Names
183-
ecd2b16a48d8b92daf31.js 40 bytes 0, 4 [emitted]
184-
3ab6307df46b05a2e3c3.js 39 bytes 1, 4 [emitted]
185-
common.chunkhash.js 154 bytes 2, 4 [emitted] common
186-
main.chunkhash.js 168 bytes 3, 4 [emitted] main
183+
d1359b519c10df30787b.js 38 bytes 0 [emitted]
184+
06459c375ec851b0e2ae.js 37 bytes 1 [emitted]
185+
common.chunkhash.js 152 bytes 2 [emitted] common
186+
main.chunkhash.js 166 bytes 3 [emitted] main
187187
manifest.chunkhash.js 1.48 kB 4 [emitted] manifest
188188
Entrypoint main = manifest.chunkhash.js common.chunkhash.js main.chunkhash.js
189189
Entrypoint common = manifest.chunkhash.js common.chunkhash.js
190-
chunk {0} ecd2b16a48d8b92daf31.js 28 bytes {3} [rendered]
190+
chunk {0} d1359b519c10df30787b.js 29 bytes {3} [rendered]
191191
> [3] ./example.js 4:0-18
192-
[2] ./async2.js 28 bytes {0} [built]
192+
[2] ./async2.js 29 bytes {0} [built]
193193
import() ./async2 [3] ./example.js 4:0-18
194-
chunk {1} 3ab6307df46b05a2e3c3.js 28 bytes {3} [rendered]
194+
chunk {1} 06459c375ec851b0e2ae.js 29 bytes {3} [rendered]
195195
> [3] ./example.js 3:0-18
196-
[1] ./async1.js 28 bytes {1} [built]
196+
[1] ./async1.js 29 bytes {1} [built]
197197
import() ./async1 [3] ./example.js 3:0-18
198-
chunk {2} common.chunkhash.js (common) 95 bytes {4} [initial] [rendered]
198+
chunk {2} common.chunkhash.js (common) 97 bytes {4} [initial] [rendered]
199199
> common [4] multi ./vendor
200-
[0] ./vendor.js 67 bytes {2} [built]
200+
[0] ./vendor.js 69 bytes {2} [built]
201201
[exports: default]
202202
harmony import ./vendor [3] ./example.js 1:0-30
203203
single entry ./vendor [4] multi ./vendor common:100000
204204
[4] multi ./vendor 28 bytes {2} [built]
205-
chunk {3} main.chunkhash.js (main) 86 bytes {2} [initial] [rendered]
205+
chunk {3} main.chunkhash.js (main) 90 bytes {2} [initial] [rendered]
206206
> main [3] ./example.js
207-
[3] ./example.js 86 bytes {3} [built]
207+
[3] ./example.js 90 bytes {3} [built]
208208
chunk {4} manifest.chunkhash.js (manifest) 0 bytes [entry] [rendered]
209209
```

‎examples/code-splitted-css-bundle/README.md‎

Lines changed: 38 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ module.exports = {
3737
loaders: [
3838
{
3939
test: /\.css$/,
40-
loader: ExtractTextPlugin.extract({
41-
notExtractLoader: "style-loader",
42-
loader: "css-loader"
40+
use: ExtractTextPlugin.extract({
41+
fallback: "style-loader",
42+
use: "css-loader"
4343
})
4444
},
4545
{ test: /\.png$/, loader: "file-loader" }
@@ -66,73 +66,83 @@ body {
6666
## Uncompressed
6767

6868
```
69-
Hash: 69987b2d59e4b1a136b3
70-
Version: webpack 2.2.0-rc.2
69+
Hash: 921f06e52b5748b2b7f9
70+
Version: webpack 2.3.2
7171
Asset Size Chunks Chunk Names
7272
ce21cbdd9b894e6af794813eb3fdaf60.png 119 bytes [emitted]
73-
0.output.js 1.04 kB 0 [emitted]
74-
output.js 7.84 kB 1 [emitted] main
73+
0.output.js 2.24 kB 0 [emitted]
74+
output.js 15.5 kB 1 [emitted] main
7575
style.css 71 bytes 1 [emitted] main
7676
Entrypoint main = output.js style.css
77-
chunk {0} 0.output.js 337 bytes {1} [rendered]
77+
chunk {0} 0.output.js 1.25 kB {1} [rendered]
7878
> [2] ./example.js 2:0-20
7979
[1] ./chunk.js 26 bytes {0} [built]
8080
amd require ./chunk [2] ./example.js 2:0-20
81-
[4] ./style2.css 229 bytes {0} [built]
81+
[5] (webpack)/~/css-loader!./style2.css 227 bytes {0} [built]
82+
cjs require !!../../node_modules/css-loader/index.js!./style2.css [6] ./style2.css 4:14-78
83+
[6] ./style2.css 914 bytes {0} [built]
8284
cjs require ./style2.css [1] ./chunk.js 1:0-23
83-
[5] ./image2.png 82 bytes {0} [built]
84-
cjs require ./image2.png [4] ./style2.css 6:58-81
85-
chunk {1} output.js, style.css (main) 1.59 kB [entry] [rendered]
85+
[7] ./image2.png 82 bytes {0} [built]
86+
cjs require ./image2.png [5] (webpack)/~/css-loader!./style2.css 6:58-81
87+
chunk {1} output.js, style.css (main) 8.75 kB [entry] [rendered]
8688
> main [2] ./example.js
8789
[0] ./style.css 41 bytes {1} [built]
8890
cjs require ./style.css [2] ./example.js 1:0-22
8991
[2] ./example.js 48 bytes {1} [built]
9092
[3] (webpack)/~/css-loader/lib/css-base.js 1.51 kB {1} [built]
91-
cjs require ./../../node_modules/css-loader/lib/css-base.js [4] ./style2.css 1:27-85
93+
cjs require ../../node_modules/css-loader/lib/css-base.js [5] (webpack)/~/css-loader!./style2.css 1:27-83
94+
cjs require ../../node_modules/css-loader/lib/css-base.js [8] (webpack)/~/css-loader!./style.css 1:27-83
95+
[4] (webpack)/~/style-loader/addStyles.js 7.15 kB {1} [built]
96+
cjs require !../../node_modules/style-loader/addStyles.js [6] ./style2.css 7:13-69
9297
Child extract-text-webpack-plugin:
9398
Entrypoint undefined = extract-text-webpack-plugin-output-filename
94-
chunk {0} extract-text-webpack-plugin-output-filename 1.82 kB [entry] [rendered]
99+
chunk {0} extract-text-webpack-plugin-output-filename 1.81 kB [entry] [rendered]
95100
> [2] (webpack)/~/css-loader!./style.css
96101
[0] (webpack)/~/css-loader/lib/css-base.js 1.51 kB {0} [built]
97-
cjs require ./../../node_modules/css-loader/lib/css-base.js [2] (webpack)/~/css-loader!./style.css 1:27-85
102+
cjs require ../../node_modules/css-loader/lib/css-base.js [2] (webpack)/~/css-loader!./style.css 1:27-83
98103
[1] ./image.png 82 bytes {0} [built]
99104
cjs require ./image.png [2] (webpack)/~/css-loader!./style.css 6:58-80
100-
[2] (webpack)/~/css-loader!./style.css 228 bytes {0} [built]
105+
[2] (webpack)/~/css-loader!./style.css 226 bytes {0} [built]
101106
```
102107

103108
## Minimized (uglify-js, no zip)
104109

105110
```
106-
Hash: 1f1b0ebfddb5b6f81a44
107-
Version: webpack 2.2.0-rc.2
111+
Hash: b832c58ce5b88806634b
112+
Version: webpack 2.3.2
108113
Asset Size Chunks Chunk Names
109114
ce21cbdd9b894e6af794813eb3fdaf60.png 119 bytes [emitted]
110-
0.output.js 201 bytes 0 [emitted]
111-
output.js 1.9 kB 1 [emitted] main
115+
0.output.js 309 bytes 0 [emitted]
116+
output.js 5.02 kB 1 [emitted] main
112117
style.css 61 bytes 1 [emitted] main
113118
Entrypoint main = output.js style.css
114-
chunk {0} 0.output.js 320 bytes {1} [rendered]
119+
chunk {0} 0.output.js 1.23 kB {1} [rendered]
115120
> [2] ./example.js 2:0-20
116121
[1] ./chunk.js 26 bytes {0} [built]
117122
amd require ./chunk [2] ./example.js 2:0-20
118-
[4] ./style2.css 212 bytes {0} [built]
123+
[5] (webpack)/~/css-loader!./style2.css 210 bytes {0} [built]
124+
cjs require !!../../node_modules/css-loader/index.js!./style2.css [6] ./style2.css 4:14-78
125+
[6] ./style2.css 914 bytes {0} [built]
119126
cjs require ./style2.css [1] ./chunk.js 1:0-23
120-
[5] ./image2.png 82 bytes {0} [built]
121-
cjs require ./image2.png [4] ./style2.css 6:50-73
122-
chunk {1} output.js, style.css (main) 1.59 kB [entry] [rendered]
127+
[7] ./image2.png 82 bytes {0} [built]
128+
cjs require ./image2.png [5] (webpack)/~/css-loader!./style2.css 6:50-73
129+
chunk {1} output.js, style.css (main) 8.75 kB [entry] [rendered]
123130
> main [2] ./example.js
124131
[0] ./style.css 41 bytes {1} [built]
125132
cjs require ./style.css [2] ./example.js 1:0-22
126133
[2] ./example.js 48 bytes {1} [built]
127134
[3] (webpack)/~/css-loader/lib/css-base.js 1.51 kB {1} [built]
128-
cjs require ./../../node_modules/css-loader/lib/css-base.js [4] ./style2.css 1:27-85
135+
cjs require ../../node_modules/css-loader/lib/css-base.js [5] (webpack)/~/css-loader!./style2.css 1:27-83
136+
cjs require ../../node_modules/css-loader/lib/css-base.js [8] (webpack)/~/css-loader!./style.css 1:27-83
137+
[4] (webpack)/~/style-loader/addStyles.js 7.15 kB {1} [built]
138+
cjs require !../../node_modules/style-loader/addStyles.js [6] ./style2.css 7:13-69
129139
Child extract-text-webpack-plugin:
130140
Entrypoint undefined = extract-text-webpack-plugin-output-filename
131141
chunk {0} extract-text-webpack-plugin-output-filename 1.8 kB [entry] [rendered]
132142
> [2] (webpack)/~/css-loader!./style.css
133143
[0] (webpack)/~/css-loader/lib/css-base.js 1.51 kB {0} [built]
134-
cjs require ./../../node_modules/css-loader/lib/css-base.js [2] (webpack)/~/css-loader!./style.css 1:27-85
144+
cjs require ../../node_modules/css-loader/lib/css-base.js [2] (webpack)/~/css-loader!./style.css 1:27-83
135145
[1] ./image.png 82 bytes {0} [built]
136146
cjs require ./image.png [2] (webpack)/~/css-loader!./style.css 6:50-72
137-
[2] (webpack)/~/css-loader!./style.css 211 bytes {0} [built]
147+
[2] (webpack)/~/css-loader!./style.css 209 bytes {0} [built]
138148
```

0 commit comments

Comments
 (0)