Skip to content

Commit e2a883f

Browse files
committed
Regenerate examples
1 parent 278a3b0 commit e2a883f

4 files changed

Lines changed: 201 additions & 202 deletions

File tree

examples/chunkhash/README.md

Lines changed: 55 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ The configuration required for this is:
1313
``` javascript
1414
import vendor from "./vendor";
1515
// some module
16-
System.import("./async1");
17-
System.import("./async2");
16+
import("./async1");
17+
import("./async2");
1818
```
1919

2020
# vendor.js
@@ -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,a,c){for(var u,i,f,s=0,l=[];s<t.length;s++)i=t[s],o[i]&&l.push(o[i][0]),o[i]=0;for(u in a)Object.prototype.hasOwnProperty.call(a,u)&&(e[u]=a[u]);for(n&&n(t,a,c);l.length;)l.shift()();if(c)for(s=0;s<c.length;s++)f=r(r.s=c[s]);return f};var t={},o={4:0};r.e=function(e){function n(){a.onerror=a.onload=null,clearTimeout(c);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],a=document.createElement("script");a.type="text/javascript",a.charset="utf-8",a.async=!0,a.timeout=12e4,r.nc&&a.setAttribute("nonce",r.nc),a.src=r.p+""+{0:"d8d9958181fae97ba27d",1:"36e4c03aa77bd58b0abc",2:"28b8ea2c1cc4eaebd919",3:"14bf1a160bee78ea17f7"}[e]+".js";var c=setTimeout(n,12e4);a.onerror=a.onload=n;var u=new Promise(function(r,n){o[e]=[r,n]});return o[e][2]=u,t.appendChild(a),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,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}}([]);
6666
</script>
6767

6868
<!-- optional when using the CommonChunkPlugin for vendor modules -->
@@ -84,30 +84,30 @@ webpackJsonp([2,4],[
8484
/*!*******************!*\
8585
!*** ./vendor.js ***!
8686
\*******************/
87-
/***/ function(module, exports, __webpack_require__) {
87+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
8888

8989
"use strict";
90-
Object.defineProperty(exports, "__esModule", { value: true });
90+
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
9191
// some vendor lib (should be in common chunk)
92-
/* harmony default export */ exports["default"] = 123;
92+
/* harmony default export */ __webpack_exports__["default"] = (123);
9393

9494

95-
/***/ },
95+
/***/ }),
9696
/* 1 */,
9797
/* 2 */,
9898
/* 3 */,
9999
/* 4 */
100100
/* unknown exports provided */
101101
/* all exports used */
102-
/*!********************!*\
103-
!*** multi common ***!
104-
\********************/
105-
/***/ function(module, exports, __webpack_require__) {
102+
/*!**********************!*\
103+
!*** multi ./vendor ***!
104+
\**********************/
105+
/***/ (function(module, exports, __webpack_require__) {
106106

107107
module.exports = __webpack_require__(/*! ./vendor */0);
108108

109109

110-
/***/ }
110+
/***/ })
111111
],[4]);
112112
```
113113

@@ -122,18 +122,18 @@ webpackJsonp([3,4],{
122122
/*!********************!*\
123123
!*** ./example.js ***!
124124
\********************/
125-
/***/ function(module, exports, __webpack_require__) {
125+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
126126

127127
"use strict";
128-
Object.defineProperty(exports, "__esModule", { value: true });
128+
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
129129
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__vendor__ = __webpack_require__(/*! ./vendor */ 0);
130130

131131
// some module
132132
__webpack_require__.e/* import() */(1).then(__webpack_require__.bind(null, /*! ./async1 */ 1));
133133
__webpack_require__.e/* import() */(0).then(__webpack_require__.bind(null, /*! ./async2 */ 2));
134134

135135

136-
/***/ }
136+
/***/ })
137137

138138
},[3]);
139139
```
@@ -143,67 +143,67 @@ __webpack_require__.e/* import() */(0).then(__webpack_require__.bind(null, /*! .
143143
## Uncompressed
144144

145145
```
146-
Hash: 7b7e514d1f86a946849f
147-
Version: webpack 2.2.0-rc.2
146+
Hash: 4e82450959815ca9c86c
147+
Version: webpack 2.2.1
148148
Asset Size Chunks Chunk Names
149-
d8d9958181fae97ba27d.js 237 bytes 0, 4 [emitted]
150-
36e4c03aa77bd58b0abc.js 243 bytes 1, 4 [emitted]
151-
common.chunkhash.js 701 bytes 2, 4 [emitted] common
152-
main.chunkhash.js 630 bytes 3, 4 [emitted] main
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
153153
manifest.chunkhash.js 5.66 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} d8d9958181fae97ba27d.js 29 bytes {3} [rendered]
157-
> [3] ./example.js 4:0-25
158-
[2] ./async2.js 29 bytes {0} [built]
159-
import() ./async2 [3] ./example.js 4:0-25
160-
chunk {1} 36e4c03aa77bd58b0abc.js 29 bytes {3} [rendered]
161-
> [3] ./example.js 3:0-25
162-
[1] ./async1.js 29 bytes {1} [built]
163-
import() ./async1 [3] ./example.js 3:0-25
164-
chunk {2} common.chunkhash.js (common) 97 bytes {4} [initial] [rendered]
165-
> common [4] multi common
166-
[0] ./vendor.js 69 bytes {2} [built]
156+
chunk {0} ecd2b16a48d8b92daf31.js 28 bytes {3} [rendered]
157+
> [3] ./example.js 4:0-18
158+
[2] ./async2.js 28 bytes {0} [built]
159+
import() ./async2 [3] ./example.js 4:0-18
160+
chunk {1} 3ab6307df46b05a2e3c3.js 28 bytes {3} [rendered]
161+
> [3] ./example.js 3:0-18
162+
[1] ./async1.js 28 bytes {1} [built]
163+
import() ./async1 [3] ./example.js 3:0-18
164+
chunk {2} common.chunkhash.js (common) 95 bytes {4} [initial] [rendered]
165+
> common [4] multi ./vendor
166+
[0] ./vendor.js 67 bytes {2} [built]
167167
[exports: default]
168168
harmony import ./vendor [3] ./example.js 1:0-30
169-
single entry ./vendor [4] multi common
170-
[4] multi common 28 bytes {2} [built]
171-
chunk {3} main.chunkhash.js (main) 104 bytes {2} [initial] [rendered]
169+
single entry ./vendor [4] multi ./vendor common:100000
170+
[4] multi ./vendor 28 bytes {2} [built]
171+
chunk {3} main.chunkhash.js (main) 86 bytes {2} [initial] [rendered]
172172
> main [3] ./example.js
173-
[3] ./example.js 104 bytes {3} [built]
173+
[3] ./example.js 86 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: 7b7e514d1f86a946849f
181-
Version: webpack 2.2.0-rc.2
180+
Hash: 4e82450959815ca9c86c
181+
Version: webpack 2.2.1
182182
Asset Size Chunks Chunk Names
183-
d8d9958181fae97ba27d.js 40 bytes 0, 4 [emitted]
184-
36e4c03aa77bd58b0abc.js 39 bytes 1, 4 [emitted]
183+
ecd2b16a48d8b92daf31.js 40 bytes 0, 4 [emitted]
184+
3ab6307df46b05a2e3c3.js 39 bytes 1, 4 [emitted]
185185
common.chunkhash.js 154 bytes 2, 4 [emitted] common
186186
main.chunkhash.js 168 bytes 3, 4 [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} d8d9958181fae97ba27d.js 29 bytes {3} [rendered]
191-
> [3] ./example.js 4:0-25
192-
[2] ./async2.js 29 bytes {0} [built]
193-
import() ./async2 [3] ./example.js 4:0-25
194-
chunk {1} 36e4c03aa77bd58b0abc.js 29 bytes {3} [rendered]
195-
> [3] ./example.js 3:0-25
196-
[1] ./async1.js 29 bytes {1} [built]
197-
import() ./async1 [3] ./example.js 3:0-25
198-
chunk {2} common.chunkhash.js (common) 97 bytes {4} [initial] [rendered]
199-
> common [4] multi common
200-
[0] ./vendor.js 69 bytes {2} [built]
190+
chunk {0} ecd2b16a48d8b92daf31.js 28 bytes {3} [rendered]
191+
> [3] ./example.js 4:0-18
192+
[2] ./async2.js 28 bytes {0} [built]
193+
import() ./async2 [3] ./example.js 4:0-18
194+
chunk {1} 3ab6307df46b05a2e3c3.js 28 bytes {3} [rendered]
195+
> [3] ./example.js 3:0-18
196+
[1] ./async1.js 28 bytes {1} [built]
197+
import() ./async1 [3] ./example.js 3:0-18
198+
chunk {2} common.chunkhash.js (common) 95 bytes {4} [initial] [rendered]
199+
> common [4] multi ./vendor
200+
[0] ./vendor.js 67 bytes {2} [built]
201201
[exports: default]
202202
harmony import ./vendor [3] ./example.js 1:0-30
203-
single entry ./vendor [4] multi common
204-
[4] multi common 28 bytes {2} [built]
205-
chunk {3} main.chunkhash.js (main) 104 bytes {2} [initial] [rendered]
203+
single entry ./vendor [4] multi ./vendor common:100000
204+
[4] multi ./vendor 28 bytes {2} [built]
205+
chunk {3} main.chunkhash.js (main) 86 bytes {2} [initial] [rendered]
206206
> main [3] ./example.js
207-
[3] ./example.js 104 bytes {3} [built]
207+
[3] ./example.js 86 bytes {3} [built]
208208
chunk {4} manifest.chunkhash.js (manifest) 0 bytes [entry] [rendered]
209209
```

examples/code-splitting-harmony/README.md

Lines changed: 48 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,21 @@ This example show how to use Code Splitting with the ES6 module syntax.
22

33
The standard `import` is sync.
44

5-
`System.import(module: string) -> Promise` can be used to load modules on demand. This acts as split point for webpack and creates a chunk.
5+
`import(module: string) -> Promise` can be used to load modules on demand. This acts as split point for webpack and creates a chunk.
66

7-
Providing dynamic expressions to `System.import` is possible. The same limits as with dynamic expressions in `require` calls apply here. Each possible module creates an additional chunk. In this example `System.import("c/" + name)` creates two additional chunks (one for each file in `node_modules/c/`). This is called "async context".
7+
Providing dynamic expressions to `import` is possible. The same limits as with dynamic expressions in `require` calls apply here. Each possible module creates an additional chunk. In this example `import("c/" + name)` creates two additional chunks (one for each file in `node_modules/c/`). This is called "async context".
88

99
# example.js
1010

1111
``` javascript
1212
import a from "a";
1313

14-
System.import("b").then(function(b) {
14+
import("b").then(function(b) {
1515
console.log("b loaded", b);
1616
})
1717

1818
function loadC(name) {
19-
return System.import("c/" + name)
19+
return import("c/" + name);
2020
}
2121

2222
Promise.all([loadC("1"), loadC("2")]).then(function(arr) {
@@ -91,7 +91,7 @@ Promise.all([loadC("1"), loadC("2")]).then(function(arr) {
9191
/******/ if(installedChunks[chunkId] === 0)
9292
/******/ return Promise.resolve();
9393

94-
/******/ // an Promise means "currently loading".
94+
/******/ // a Promise means "currently loading".
9595
/******/ if(installedChunks[chunkId]) {
9696
/******/ return installedChunks[chunkId][2];
9797
/******/ }
@@ -168,7 +168,7 @@ Promise.all([loadC("1"), loadC("2")]).then(function(arr) {
168168
/******/ __webpack_require__.oe = function(err) { console.error(err); throw err; };
169169

170170
/******/ // Load entry module and return exports
171-
/******/ return __webpack_require__(__webpack_require__.s = 5);
171+
/******/ return __webpack_require__(__webpack_require__.s = 4);
172172
/******/ })
173173
/************************************************************************/
174174
```
@@ -180,18 +180,18 @@ Promise.all([loadC("1"), loadC("2")]).then(function(arr) {
180180
/*!****************!*\
181181
!*** ./~/a.js ***!
182182
\****************/
183-
/***/ function(module, exports) {
183+
/***/ (function(module, exports) {
184184

185185
// module a
186186

187-
/***/ },
187+
/***/ }),
188188
/* 1 */
189189
/* unknown exports provided */
190190
/* all exports used */
191191
/*!****************************!*\
192192
!*** ./~/c async ^\.\/.*$ ***!
193193
\****************************/
194-
/***/ function(module, exports, __webpack_require__) {
194+
/***/ (function(module, exports, __webpack_require__) {
195195

196196
var map = {
197197
"./1": [
@@ -225,38 +225,37 @@ module.exports = webpackAsyncContext;
225225
webpackAsyncContext.id = 1;
226226

227227

228-
/***/ },
228+
/***/ }),
229229
/* 2 */,
230230
/* 3 */,
231-
/* 4 */,
232-
/* 5 */
231+
/* 4 */
233232
/* unknown exports provided */
234233
/* all exports used */
235234
/*!********************!*\
236235
!*** ./example.js ***!
237236
\********************/
238-
/***/ function(module, exports, __webpack_require__) {
237+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
239238

240239
"use strict";
241-
Object.defineProperty(exports, "__esModule", { value: true });
240+
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
242241
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_a__ = __webpack_require__(/*! a */ 0);
243242
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_a___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_a__);
244243

245244

246-
__webpack_require__.e/* import() */(2).then(__webpack_require__.bind(null, /*! b */ 4)).then(function(b) {
245+
__webpack_require__.e/* import() */(2).then(__webpack_require__.bind(null, /*! b */ 5)).then(function(b) {
247246
console.log("b loaded", b);
248247
})
249248

250249
function loadC(name) {
251-
return __webpack_require__(/*! c */ 1)("./" + name)
250+
return __webpack_require__(/*! c */ 1)("./" + name);
252251
}
253252

254253
Promise.all([loadC("1"), loadC("2")]).then(function(arr) {
255254
console.log("c/1 and c/2 loaded", arr);
256255
});
257256

258257

259-
/***/ }
258+
/***/ })
260259
/******/ ]);
261260
```
262261

@@ -266,41 +265,41 @@ Promise.all([loadC("1"), loadC("2")]).then(function(arr) {
266265
## Uncompressed
267266

268267
```
269-
Hash: a7c705649f12226cfe93
270-
Version: webpack 2.2.0-rc.2
268+
Hash: ba65a04e3475286b58c0
269+
Version: webpack 2.2.1
271270
Asset Size Chunks Chunk Names
272-
0.output.js 216 bytes 0 [emitted]
273-
1.output.js 216 bytes 1 [emitted]
274-
2.output.js 208 bytes 2 [emitted]
275-
output.js 7.22 kB 3 [emitted] main
271+
0.output.js 218 bytes 0 [emitted]
272+
1.output.js 218 bytes 1 [emitted]
273+
2.output.js 210 bytes 2 [emitted]
274+
output.js 7.23 kB 3 [emitted] main
276275
Entrypoint main = output.js
277276
chunk {0} 0.output.js 13 bytes {3} [rendered]
278277
[3] ./~/c/2.js 13 bytes {0} [optional] [built]
279-
context element ./2 [1] ./~/c async ^\.\/.*$
280-
context element ./2.js [1] ./~/c async ^\.\/.*$
278+
context element ./2 [1] ./~/c async ^\.\/.*$ ./2
279+
context element ./2.js [1] ./~/c async ^\.\/.*$ ./2.js
281280
chunk {1} 1.output.js 13 bytes {3} [rendered]
282281
[2] ./~/c/1.js 13 bytes {1} [optional] [built]
283-
context element ./1 [1] ./~/c async ^\.\/.*$
284-
context element ./1.js [1] ./~/c async ^\.\/.*$
282+
context element ./1 [1] ./~/c async ^\.\/.*$ ./1
283+
context element ./1.js [1] ./~/c async ^\.\/.*$ ./1.js
285284
chunk {2} 2.output.js 11 bytes {3} [rendered]
286-
> [5] ./example.js 3:0-18
287-
[4] ./~/b.js 11 bytes {2} [built]
288-
import() b [5] ./example.js 3:0-18
289-
chunk {3} output.js (main) 440 bytes [entry] [rendered]
290-
> main [5] ./example.js
285+
> [4] ./example.js 3:0-11
286+
[5] ./~/b.js 11 bytes {2} [built]
287+
import() b [4] ./example.js 3:0-11
288+
chunk {3} output.js (main) 414 bytes [entry] [rendered]
289+
> main [4] ./example.js
291290
[0] ./~/a.js 11 bytes {3} [built]
292291
[no exports used]
293-
harmony import a [5] ./example.js 1:0-18
292+
harmony import a [4] ./example.js 1:0-18
294293
[1] ./~/c async ^\.\/.*$ 160 bytes {3} [built]
295-
System.import context c [5] ./example.js 8:8-34
296-
[5] ./example.js 269 bytes {3} [built]
294+
System.import context c [4] ./example.js 8:8-27
295+
[4] ./example.js 243 bytes {3} [built]
297296
```
298297

299298
## Minimized (uglify-js, no zip)
300299

301300
```
302-
Hash: a7c705649f12226cfe93
303-
Version: webpack 2.2.0-rc.2
301+
Hash: ba65a04e3475286b58c0
302+
Version: webpack 2.2.1
304303
Asset Size Chunks Chunk Names
305304
0.output.js 38 bytes 0 [emitted]
306305
1.output.js 38 bytes 1 [emitted]
@@ -309,22 +308,22 @@ Version: webpack 2.2.0-rc.2
309308
Entrypoint main = output.js
310309
chunk {0} 0.output.js 13 bytes {3} [rendered]
311310
[3] ./~/c/2.js 13 bytes {0} [optional] [built]
312-
context element ./2 [1] ./~/c async ^\.\/.*$
313-
context element ./2.js [1] ./~/c async ^\.\/.*$
311+
context element ./2 [1] ./~/c async ^\.\/.*$ ./2
312+
context element ./2.js [1] ./~/c async ^\.\/.*$ ./2.js
314313
chunk {1} 1.output.js 13 bytes {3} [rendered]
315314
[2] ./~/c/1.js 13 bytes {1} [optional] [built]
316-
context element ./1 [1] ./~/c async ^\.\/.*$
317-
context element ./1.js [1] ./~/c async ^\.\/.*$
315+
context element ./1 [1] ./~/c async ^\.\/.*$ ./1
316+
context element ./1.js [1] ./~/c async ^\.\/.*$ ./1.js
318317
chunk {2} 2.output.js 11 bytes {3} [rendered]
319-
> [5] ./example.js 3:0-18
320-
[4] ./~/b.js 11 bytes {2} [built]
321-
import() b [5] ./example.js 3:0-18
322-
chunk {3} output.js (main) 440 bytes [entry] [rendered]
323-
> main [5] ./example.js
318+
> [4] ./example.js 3:0-11
319+
[5] ./~/b.js 11 bytes {2} [built]
320+
import() b [4] ./example.js 3:0-11
321+
chunk {3} output.js (main) 414 bytes [entry] [rendered]
322+
> main [4] ./example.js
324323
[0] ./~/a.js 11 bytes {3} [built]
325324
[no exports used]
326-
harmony import a [5] ./example.js 1:0-18
325+
harmony import a [4] ./example.js 1:0-18
327326
[1] ./~/c async ^\.\/.*$ 160 bytes {3} [built]
328-
System.import context c [5] ./example.js 8:8-34
329-
[5] ./example.js 269 bytes {3} [built]
327+
System.import context c [4] ./example.js 8:8-27
328+
[4] ./example.js 243 bytes {3} [built]
330329
```

0 commit comments

Comments
 (0)