Skip to content

Commit 3a310f2

Browse files
docs: update examples (#21736)
Co-authored-by: alexander-akait <[email protected]>
1 parent 05c6ffa commit 3a310f2

62 files changed

Lines changed: 2020 additions & 2495 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎examples/aggressive-merging/README.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,9 @@ module.exports = config;
6565
## Unoptimized
6666

6767
```
68-
asset pageA.bundle.js 8.86 KiB [emitted] (name: pageA)
69-
asset pageB.bundle.js 8.86 KiB [emitted] (name: pageB)
70-
asset pageC.bundle.js 8.86 KiB [emitted] (name: pageC)
68+
asset pageA.bundle.js 8.71 KiB [emitted] (name: pageA)
69+
asset pageB.bundle.js 8.71 KiB [emitted] (name: pageB)
70+
asset pageC.bundle.js 8.71 KiB [emitted] (name: pageC)
7171
asset 531.chunk.js 6.28 KiB [emitted]
7272
asset 78.chunk.js 581 bytes [emitted]
7373
chunk (runtime: pageC) 78.chunk.js 42 bytes [rendered]

‎examples/asset-svg-data-uri/README.md‎

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,8 @@ module.exports = config;
8989
!*** ./images/file.svg ***!
9090
\*************************/
9191
/*! default exports */
92-
/*! exports [not provided] [no usage info] */
92+
/*! export default [not provided] [no usage info] [missing usage info prevents renaming] */
93+
/*! other exports [not provided] [no usage info] */
9394
/*! runtime requirements: module */
9495
/***/ ((module) => {
9596

@@ -129,15 +130,13 @@ module.exports = "data:image/svg+xml,%3csvg xmlns='http://www.w3.or...3c/svg%3e"
129130
/******/
130131
/************************************************************************/
131132
/******/ /* webpack/runtime/make namespace object */
132-
/******/ (() => {
133-
/******/ // define __esModule on exports
134-
/******/ __webpack_require__.r = (exports) => {
135-
/******/ if(Symbol.toStringTag) {
136-
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
137-
/******/ }
138-
/******/ Object.defineProperty(exports, '__esModule', { value: true });
139-
/******/ };
140-
/******/ })();
133+
/******/ // define __esModule on exports
134+
/******/ __webpack_require__.r = (exports) => {
135+
/******/ if(Symbol.toStringTag) {
136+
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
137+
/******/ }
138+
/******/ Object.defineProperty(exports, '__esModule', { value: true });
139+
/******/ };
141140
/******/
142141
/************************************************************************/
143142
```
@@ -196,7 +195,7 @@ function createImageElement(title, src) {
196195
## webpack output
197196

198197
```
199-
asset output.js 3.79 KiB [emitted] (name: main)
198+
asset output.js 3.84 KiB [emitted] (name: main)
200199
chunk (runtime: main) output.js (main) 1.54 KiB (javascript) 241 bytes (runtime) [entry] [rendered]
201200
> ./example.js main
202201
dependent modules 915 bytes [dependent] 1 module

‎examples/asset/README.md‎

Lines changed: 22 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,8 @@ module.exports = config;
158158
!*** ./images/file.png ***!
159159
\*************************/
160160
/*! default exports */
161-
/*! exports [not provided] [no usage info] */
161+
/*! export default [not provided] [no usage info] [missing usage info prevents renaming] */
162+
/*! other exports [not provided] [no usage info] */
162163
/*! runtime requirements: __webpack_require__.p, module, __webpack_require__.* */
163164
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
164165

@@ -170,7 +171,8 @@ module.exports = __webpack_require__.p + "images/89a353e9c515885abd8e.png";
170171
!*** ./images/file.jpg ***!
171172
\*************************/
172173
/*! default exports */
173-
/*! exports [not provided] [no usage info] */
174+
/*! export default [not provided] [no usage info] [missing usage info prevents renaming] */
175+
/*! other exports [not provided] [no usage info] */
174176
/*! runtime requirements: module */
175177
/***/ ((module) => {
176178

@@ -182,7 +184,8 @@ module.exports = "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAASABIAA...4CD/9M//Z"
182184
!*** ./images/file.svg ***!
183185
\*************************/
184186
/*! default exports */
185-
/*! exports [not provided] [no usage info] */
187+
/*! export default [not provided] [no usage info] [missing usage info prevents renaming] */
188+
/*! other exports [not provided] [no usage info] */
186189
/*! runtime requirements: module */
187190
/***/ ((module) => {
188191

@@ -206,7 +209,8 @@ module.exports = __webpack_require__.p + "images/afc10c70ed4ce2b33593.svg";
206209
!*** ./content/file.text ***!
207210
\***************************/
208211
/*! default exports */
209-
/*! exports [not provided] [no usage info] */
212+
/*! export default [not provided] [no usage info] [missing usage info prevents renaming] */
213+
/*! other exports [not provided] [no usage info] */
210214
/*! runtime requirements: module */
211215
/***/ ((module) => {
212216

@@ -218,7 +222,8 @@ module.exports = "a Ā 𐀀 文 🦄 Text\n";
218222
!*** ./content/bytes.svg ***!
219223
\***************************/
220224
/*! default exports */
221-
/*! exports [not provided] [no usage info] */
225+
/*! export default [not provided] [no usage info] [missing usage info prevents renaming] */
226+
/*! other exports [not provided] [no usage info] */
222227
/*! runtime requirements: __webpack_require__.*, __webpack_require__.tb, module */
223228
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
224229

@@ -256,25 +261,15 @@ module.exports = __webpack_require__.tb("PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmc
256261
/******/ return module.exports;
257262
/******/ }
258263
/******/
259-
/******/ // expose the modules object (__webpack_modules__)
260-
/******/ __webpack_require__.m = __webpack_modules__;
261-
/******/
262264
/************************************************************************/
263-
/******/ /* webpack/runtime/hasOwnProperty shorthand */
264-
/******/ (() => {
265-
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
266-
/******/ })();
267-
/******/
268265
/******/ /* webpack/runtime/make namespace object */
269-
/******/ (() => {
270-
/******/ // define __esModule on exports
271-
/******/ __webpack_require__.r = (exports) => {
272-
/******/ if(Symbol.toStringTag) {
273-
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
274-
/******/ }
275-
/******/ Object.defineProperty(exports, '__esModule', { value: true });
276-
/******/ };
277-
/******/ })();
266+
/******/ // define __esModule on exports
267+
/******/ __webpack_require__.r = (exports) => {
268+
/******/ if(Symbol.toStringTag) {
269+
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
270+
/******/ }
271+
/******/ Object.defineProperty(exports, '__esModule', { value: true });
272+
/******/ };
278273
/******/
279274
/******/ /* webpack/runtime/to binary */
280275
/******/ (() => {
@@ -306,20 +301,13 @@ module.exports = __webpack_require__.tb("PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmc
306301
/******/ })();
307302
/******/
308303
/******/ /* webpack/runtime/publicPath */
309-
/******/ (() => {
310-
/******/ __webpack_require__.p = "dist/";
311-
/******/ })();
304+
/******/ __webpack_require__.p = "dist/";
312305
/******/
313306
/******/ /* webpack/runtime/jsonp chunk loading */
314307
/******/ (() => {
315308
/******/ __webpack_require__.b = (typeof document !== 'undefined' && document.baseURI) || self.location.href;
316309
/******/
317-
/******/ // object to store loaded and loading chunks
318-
/******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched
319-
/******/ // [resolve, reject, Promise] = chunk loading, 0 = chunk loaded
320-
/******/ const installedChunks = {
321-
/******/ 0: 0
322-
/******/ };
310+
/******/ // no installed chunks
323311
/******/
324312
/******/ // no chunk on demand loading
325313
/******/
@@ -485,13 +473,13 @@ files.forEach(item => {
485473
## webpack output
486474
487475
```
488-
asset output.js 19.8 KiB [emitted] (name: main)
476+
asset output.js 19.6 KiB [emitted] (name: main)
489477
asset images/89a353e9c515885abd8e.png 14.6 KiB [emitted] [immutable] [from: images/file.png] (auxiliary name: main)
490478
asset images/afc10c70ed4ce2b33593.svg 656 bytes [emitted] [immutable] [from: images/url.svg] (auxiliary name: main)
491-
chunk (runtime: main) output.js (main) 12.4 KiB (javascript) 15.2 KiB (asset) 1.82 KiB (runtime) [entry] [rendered]
479+
chunk (runtime: main) output.js (main) 12.4 KiB (javascript) 15.2 KiB (asset) 1.55 KiB (runtime) [entry] [rendered]
492480
> ./example.js main
493481
dependent modules 9.59 KiB (javascript) 15.2 KiB (asset) [dependent] 6 modules
494-
runtime modules 1.82 KiB 5 modules
482+
runtime modules 1.55 KiB 4 modules
495483
./example.js 2.85 KiB [built] [code generated]
496484
[no exports]
497485
[used exports unknown]

‎examples/build-http/README.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ module.exports = config;
4040
## Unoptimized
4141

4242
```
43-
asset output.js 83 KiB [emitted] (name: main)
44-
runtime modules 1.07 KiB 3 modules
43+
asset output.js 82.9 KiB [emitted] (name: main)
44+
runtime modules 1.08 KiB 3 modules
4545
modules by path https:// 30 KiB
4646
modules by path https://jspm.dev/ 16.1 KiB 12 modules
4747
modules by path https://cdn.esm.sh/ 6.15 KiB

‎examples/chunkhash/README.md‎

Lines changed: 45 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -160,58 +160,50 @@ module.exports = config;
160160
/******/ })();
161161
/******/
162162
/******/ /* webpack/runtime/define property getters */
163-
/******/ (() => {
164-
/******/ // define getter/value functions for harmony exports
165-
/******/ __webpack_require__.d = (exports, definition) => {
166-
/******/ if(Array.isArray(definition)) {
167-
/******/ var i = 0;
168-
/******/ while(i < definition.length) {
169-
/******/ var key = definition[i++];
170-
/******/ var binding = definition[i++];
171-
/******/ if(!__webpack_require__.o(exports, key)) {
172-
/******/ if(binding === 0) {
173-
/******/ Object.defineProperty(exports, key, { enumerable: true, value: definition[i++] });
174-
/******/ } else {
175-
/******/ Object.defineProperty(exports, key, { enumerable: true, get: binding });
176-
/******/ }
177-
/******/ } else if(binding === 0) { i++; }
178-
/******/ }
179-
/******/ } else {
180-
/******/ for(var key in definition) {
181-
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
182-
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
163+
/******/ // define getter/value functions for harmony exports
164+
/******/ __webpack_require__.d = (exports, definition) => {
165+
/******/ if(Array.isArray(definition)) {
166+
/******/ var i = 0;
167+
/******/ while(i < definition.length) {
168+
/******/ var key = definition[i++];
169+
/******/ var binding = definition[i++];
170+
/******/ if(!__webpack_require__.o(exports, key)) {
171+
/******/ if(binding === 0) {
172+
/******/ Object.defineProperty(exports, key, { enumerable: true, value: definition[i++] });
173+
/******/ } else {
174+
/******/ Object.defineProperty(exports, key, { enumerable: true, get: binding });
183175
/******/ }
176+
/******/ } else if(binding === 0) { i++; }
177+
/******/ }
178+
/******/ } else {
179+
/******/ for(var key in definition) {
180+
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
181+
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
184182
/******/ }
185183
/******/ }
186-
/******/ };
187-
/******/ })();
184+
/******/ }
185+
/******/ };
188186
/******/
189187
/******/ /* webpack/runtime/ensure chunk */
190-
/******/ (() => {
191-
/******/ __webpack_require__.f = {};
192-
/******/ // This file contains only the entry chunk.
193-
/******/ // The chunk loading function for additional chunks
194-
/******/ __webpack_require__.e = (chunkId) => {
195-
/******/ return Promise.all(Object.keys(__webpack_require__.f).reduce((promises, key) => {
196-
/******/ __webpack_require__.f[key](chunkId, promises);
197-
/******/ return promises;
198-
/******/ }, []));
199-
/******/ };
200-
/******/ })();
188+
/******/ __webpack_require__.f = {};
189+
/******/ // This file contains only the entry chunk.
190+
/******/ // The chunk loading function for additional chunks
191+
/******/ __webpack_require__.e = (chunkId) => {
192+
/******/ return Promise.all(Object.keys(__webpack_require__.f).reduce((promises, key) => {
193+
/******/ __webpack_require__.f[key](chunkId, promises);
194+
/******/ return promises;
195+
/******/ }, []));
196+
/******/ };
201197
/******/
202198
/******/ /* webpack/runtime/get javascript chunk filename */
203-
/******/ (() => {
204-
/******/ // This function allow to reference async chunks
205-
/******/ __webpack_require__.u = (chunkId) => {
206-
/******/ // return url for filenames based on template
207-
/******/ return "" + chunkId + ".[chunkhash].js";
208-
/******/ };
209-
/******/ })();
199+
/******/ // This function allow to reference async chunks
200+
/******/ __webpack_require__.u = (chunkId) => {
201+
/******/ // return url for filenames based on template
202+
/******/ return "" + chunkId + ".[chunkhash].js";
203+
/******/ };
210204
/******/
211205
/******/ /* webpack/runtime/hasOwnProperty shorthand */
212-
/******/ (() => {
213-
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
214-
/******/ })();
206+
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop));
215207
/******/
216208
/******/ /* webpack/runtime/load script */
217209
/******/ (() => {
@@ -259,20 +251,16 @@ module.exports = config;
259251
/******/ })();
260252
/******/
261253
/******/ /* webpack/runtime/make namespace object */
262-
/******/ (() => {
263-
/******/ // define __esModule on exports
264-
/******/ __webpack_require__.r = (exports) => {
265-
/******/ if(Symbol.toStringTag) {
266-
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
267-
/******/ }
268-
/******/ Object.defineProperty(exports, '__esModule', { value: true });
269-
/******/ };
270-
/******/ })();
254+
/******/ // define __esModule on exports
255+
/******/ __webpack_require__.r = (exports) => {
256+
/******/ if(Symbol.toStringTag) {
257+
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
258+
/******/ }
259+
/******/ Object.defineProperty(exports, '__esModule', { value: true });
260+
/******/ };
271261
/******/
272262
/******/ /* webpack/runtime/publicPath */
273-
/******/ (() => {
274-
/******/ __webpack_require__.p = "dist/";
275-
/******/ })();
263+
/******/ __webpack_require__.p = "dist/";
276264
/******/
277265
/******/ /* webpack/runtime/jsonp chunk loading */
278266
/******/ (() => {
@@ -408,11 +396,11 @@ __webpack_require__.e(/*! import() */ 3).then(__webpack_require__.t.bind(__webpa
408396
## Unoptimized
409397
410398
```
411-
asset runtime~main.[chunkhash].js 12.8 KiB [emitted] (name: runtime~main)
399+
asset runtime~main.[chunkhash].js 12.6 KiB [emitted] (name: runtime~main)
412400
asset main.[chunkhash].js 873 bytes [emitted] (name: main)
413401
asset 2.[chunkhash].js 285 bytes [emitted]
414402
asset 3.[chunkhash].js 267 bytes [emitted]
415-
Entrypoint main 13.7 KiB = runtime~main.[chunkhash].js 12.8 KiB main.[chunkhash].js 873 bytes
403+
Entrypoint main 13.4 KiB = runtime~main.[chunkhash].js 12.6 KiB main.[chunkhash].js 873 bytes
416404
chunk (runtime: runtime~main) main.[chunkhash].js (main) 55 bytes [initial] [rendered]
417405
> ./example main
418406
./example.js 55 bytes [built] [code generated]

0 commit comments

Comments
 (0)