Skip to content

Commit

Permalink
update examples
Browse files Browse the repository at this point in the history
  • Loading branch information
sokra committed Oct 10, 2020
1 parent bbe1230 commit 5ce65c1
Show file tree
Hide file tree
Showing 56 changed files with 205 additions and 230 deletions.
4 changes: 2 additions & 2 deletions examples/aggressive-merging/README.md
Expand Up @@ -113,7 +113,7 @@ chunk 456.chunk.js 5.45 KiB [rendered]
cjs self exports reference ./common.js 1:0-14
amd require ./common ./pageA.js 1:0-3:2
amd require ./common ./pageB.js 1:0-3:2
webpack 5.0.0-rc.2 compiled successfully
webpack 5.0.0 compiled successfully
```

## Production mode
Expand Down Expand Up @@ -172,5 +172,5 @@ chunk (runtime: pageA, pageB) 456.chunk.js 5.45 KiB [rendered]
cjs self exports reference ./common.js 1:0-14
amd require ./common ./pageA.js 1:0-3:2
amd require ./common ./pageB.js 1:0-3:2
webpack 5.0.0-rc.2 compiled successfully
webpack 5.0.0 compiled successfully
```
2 changes: 1 addition & 1 deletion examples/asset-advanced/README.md
Expand Up @@ -198,5 +198,5 @@ chunk output.js (main) 1.54 KiB (javascript) 274 bytes (runtime) [entry] [render
[no exports]
[used exports unknown]
entry ./example.js main
webpack 5.0.0-rc.2 compiled successfully
webpack 5.0.0 compiled successfully
```
2 changes: 1 addition & 1 deletion examples/asset-simple/README.md
Expand Up @@ -219,5 +219,5 @@ chunk output.js (main) 9.58 KiB (javascript) 14.6 KiB (asset) 306 bytes (runtime
[no exports]
[used exports unknown]
entry ./example.js main
webpack 5.0.0-rc.2 compiled successfully
webpack 5.0.0 compiled successfully
```
4 changes: 2 additions & 2 deletions examples/chunkhash/README.md
Expand Up @@ -410,7 +410,7 @@ chunk 3.[chunkhash].js 28 bytes [rendered]
./async2.js 28 bytes [built] [code generated]
[used exports unknown]
import() ./async2 ./example.js 3:0-18
webpack 5.0.0-rc.2 compiled successfully
webpack 5.0.0 compiled successfully
```

## Production mode
Expand Down Expand Up @@ -439,5 +439,5 @@ chunk (runtime: runtime~main) main.[chunkhash].js (main) 55 bytes [initial] [ren
chunk (runtime: runtime~main) runtime~main.[chunkhash].js (runtime~main) 7.27 KiB [entry] [rendered]
> ./example main
runtime modules 7.27 KiB 9 modules
webpack 5.0.0-rc.2 compiled successfully
webpack 5.0.0 compiled successfully
```
8 changes: 4 additions & 4 deletions examples/cjs-tree-shaking/README.md
Expand Up @@ -191,7 +191,7 @@ chunk (runtime: main) output.js (main) 634 bytes [entry] [rendered]
./example.js 70 bytes [built] [code generated]
[no exports used]
entry ./example.js main
webpack 5.0.0-rc.2 compiled successfully
webpack 5.0.0 compiled successfully
asset without.js 2.91 KiB [emitted] (name: main)
chunk without.js (main) 634 bytes [entry] [rendered]
Expand All @@ -200,7 +200,7 @@ chunk without.js (main) 634 bytes [entry] [rendered]
./example.js 70 bytes [built] [code generated]
[used exports unknown]
entry ./example.js main
webpack 5.0.0-rc.2 compiled successfully
webpack 5.0.0 compiled successfully
```

## Production mode
Expand All @@ -213,7 +213,7 @@ chunk (runtime: main) output.js (main) 634 bytes [entry] [rendered]
./example.js 70 bytes [built] [code generated]
[no exports used]
entry ./example.js main
webpack 5.0.0-rc.2 compiled successfully
webpack 5.0.0 compiled successfully
asset without.js 537 bytes [emitted] [minimized] (name: main) 1 related asset
chunk without.js (main) 634 bytes [entry] [rendered]
Expand All @@ -222,5 +222,5 @@ chunk without.js (main) 634 bytes [entry] [rendered]
./example.js 70 bytes [built] [code generated]
[used exports unknown]
entry ./example.js main
webpack 5.0.0-rc.2 compiled successfully
webpack 5.0.0 compiled successfully
```
4 changes: 2 additions & 2 deletions examples/code-splitted-require.context-amd/README.md
Expand Up @@ -359,7 +359,7 @@ chunk 577.output.js 457 bytes [rendered]
[no exports]
[used exports unknown]
amd require context ./example.js 2:1-4:3
webpack 5.0.0-rc.2 compiled successfully
webpack 5.0.0 compiled successfully
```

## Production mode
Expand All @@ -379,5 +379,5 @@ chunk (runtime: main) 577.output.js 457 bytes [rendered]
../require.context/templates/ sync ^\.\/.*$ 217 bytes [built] [code generated]
[no exports]
amd require context ./example.js 2:1-4:3
webpack 5.0.0-rc.2 compiled successfully
webpack 5.0.0 compiled successfully
```
4 changes: 2 additions & 2 deletions examples/code-splitted-require.context/README.md
Expand Up @@ -359,7 +359,7 @@ chunk 577.output.js 457 bytes [rendered]
[no exports]
[used exports unknown]
cjs require context ./example.js 3:11-64
webpack 5.0.0-rc.2 compiled successfully
webpack 5.0.0 compiled successfully
```

## Production mode
Expand All @@ -379,5 +379,5 @@ chunk (runtime: main) 577.output.js 457 bytes [rendered]
../require.context/templates/ sync ^\.\/.*$ 217 bytes [built] [code generated]
[no exports]
cjs require context ./example.js 3:11-64
webpack 5.0.0-rc.2 compiled successfully
webpack 5.0.0 compiled successfully
```
4 changes: 2 additions & 2 deletions examples/code-splitting-bundle-loader/README.md
Expand Up @@ -316,7 +316,7 @@ chunk 929.output.js 28 bytes [rendered]
[used exports unknown]
cjs self exports reference ./file.js 1:0-14
cjs require !!./file.js ../../node_modules/bundle-loader/index.js!./file.js 8:8-30
webpack 5.0.0-rc.2 compiled successfully
webpack 5.0.0 compiled successfully
```

## Production mode
Expand All @@ -337,5 +337,5 @@ chunk (runtime: main) 929.output.js 28 bytes [rendered]
[used exports unknown]
cjs self exports reference ./file.js 1:0-14
cjs require !!./file.js ../../node_modules/bundle-loader/index.js!./file.js 8:8-30
webpack 5.0.0-rc.2 compiled successfully
webpack 5.0.0 compiled successfully
```
4 changes: 2 additions & 2 deletions examples/code-splitting-depend-on-advanced/README.md
Expand Up @@ -603,7 +603,7 @@ chunk runtime.js (runtime) 6.86 KiB ={other-vendors}= ={react-vendors}= >{app}<
> react react-vendors
> react-dom react-vendors
runtime modules 6.86 KiB 9 modules
webpack 5.0.0-rc.2 compiled successfully
webpack 5.0.0 compiled successfully
```

## Production mode
Expand Down Expand Up @@ -671,5 +671,5 @@ chunk (runtime: runtime) runtime.js (runtime) 6.86 KiB ={other-vendors}= ={react
> react react-vendors
> react-dom react-vendors
runtime modules 6.86 KiB 9 modules
webpack 5.0.0-rc.2 compiled successfully
webpack 5.0.0 compiled successfully
```
4 changes: 2 additions & 2 deletions examples/code-splitting-depend-on-simple/README.md
Expand Up @@ -327,7 +327,7 @@ chunk react-vendors.js (react-vendors) 87 bytes (javascript) 3.42 KiB (runtime)
harmony import specifier react ./app.js 5:12-17
cjs self exports reference ./node_modules/react.js 1:0-14
entry react react-vendors
webpack 5.0.0-rc.2 compiled successfully
webpack 5.0.0 compiled successfully
```

## Production mode
Expand Down Expand Up @@ -365,5 +365,5 @@ chunk (runtime: react-vendors) react-vendors.js (react-vendors) 87 bytes (javasc
harmony import specifier react ./app.js 5:12-17
cjs self exports reference ./node_modules/react.js 1:0-14
entry react react-vendors
webpack 5.0.0-rc.2 compiled successfully
webpack 5.0.0 compiled successfully
```
61 changes: 18 additions & 43 deletions examples/code-splitting-harmony/README.md
Expand Up @@ -35,21 +35,19 @@ Promise.all([loadC("1"), loadC("2")]).then(function(arr) {
\********************/
/*! namespace exports */
/*! exports [not provided] [no usage info] */
/*! runtime requirements: __webpack_require__, __webpack_require__.n, __webpack_require__.r, __webpack_exports__, __webpack_require__.e, __webpack_require__.t, __webpack_require__.* */
/*! runtime requirements: __webpack_require__, __webpack_require__.r, __webpack_exports__, __webpack_require__.e, __webpack_require__.t, __webpack_require__.* */
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var a__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! a */ 1);
/* harmony import */ var a__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(a__WEBPACK_IMPORTED_MODULE_0__);


__webpack_require__.e(/*! import() */ 644).then(__webpack_require__.t.bind(__webpack_require__, /*! b */ 3, 7)).then(function(b) {
__webpack_require__.e(/*! import() */ 644).then(__webpack_require__.t.bind(__webpack_require__, /*! b */ 2, 7)).then(function(b) {
console.log("b loaded", b);
})

function loadC(name) {
return __webpack_require__(2)("./" + name);
return __webpack_require__(1)("./" + name);
}

Promise.all([loadC("1"), loadC("2")]).then(function(arr) {
Expand All @@ -59,17 +57,6 @@ Promise.all([loadC("1"), loadC("2")]).then(function(arr) {

/***/ }),
/* 1 */
/*!***************************!*\
!*** ./node_modules/a.js ***!
\***************************/
/*! unknown exports (runtime-defined) */
/*! runtime requirements: */
/***/ (() => {

// module a

/***/ }),
/* 2 */
/*!********************************************************!*\
!*** ./node_modules/c/ lazy ^\.\/.*$ namespace object ***!
\********************************************************/
Expand All @@ -80,19 +67,19 @@ Promise.all([loadC("1"), loadC("2")]).then(function(arr) {

var map = {
"./1": [
4,
3,
346
],
"./1.js": [
4,
3,
346
],
"./2": [
5,
4,
98
],
"./2.js": [
5,
4,
98
]
};
Expand All @@ -111,7 +98,7 @@ function webpackAsyncContext(req) {
});
}
webpackAsyncContext.keys = () => Object.keys(map);
webpackAsyncContext.id = 2;
webpackAsyncContext.id = 1;
module.exports = webpackAsyncContext;

/***/ })
Expand Down Expand Up @@ -149,18 +136,6 @@ module.exports = webpackAsyncContext;
/******/ __webpack_require__.m = __webpack_modules__;
/******/
/************************************************************************/
/******/ /* webpack/runtime/compat get default export */
/******/ (() => {
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ __webpack_require__.n = (module) => {
/******/ var getter = module && module.__esModule ?
/******/ () => module['default'] :
/******/ () => module;
/******/ __webpack_require__.d(getter, { a: getter });
/******/ return getter;
/******/ };
/******/ })();
/******/
/******/ /* webpack/runtime/create fake namespace object */
/******/ (() => {
/******/ // create a fake namespace object
Expand Down Expand Up @@ -398,7 +373,7 @@ module.exports = webpackAsyncContext;
## Unoptimized

```
asset output.js 13.1 KiB [emitted] (name: main)
asset output.js 12.2 KiB [emitted] (name: main)
asset 346.output.js 296 bytes [emitted]
asset 98.output.js 295 bytes [emitted]
asset 644.output.js 288 bytes [emitted]
Expand All @@ -409,10 +384,10 @@ chunk 98.output.js 13 bytes [rendered]
[used exports unknown]
context element ./2 ./node_modules/c/ lazy ^\.\/.*$ namespace object ./2
context element ./2.js ./node_modules/c/ lazy ^\.\/.*$ namespace object ./2.js
chunk output.js (main) 414 bytes (javascript) 6.34 KiB (runtime) [entry] [rendered]
chunk output.js (main) 403 bytes (javascript) 6.08 KiB (runtime) [entry] [rendered]
> ./example.js main
runtime modules 6.34 KiB 10 modules
dependent modules 171 bytes [dependent] 2 modules
runtime modules 6.08 KiB 9 modules
dependent modules 160 bytes [dependent] 1 module
./example.js 243 bytes [built] [code generated]
[no exports]
[used exports unknown]
Expand All @@ -429,13 +404,13 @@ chunk 644.output.js 11 bytes [rendered]
./node_modules/b.js 11 bytes [built] [code generated]
[used exports unknown]
import() b ./example.js 3:0-11
webpack 5.0.0-rc.2 compiled successfully
webpack 5.0.0 compiled successfully
```

## Production mode

```
asset output.js 2.71 KiB [emitted] [minimized] (name: main)
asset output.js 2.62 KiB [emitted] [minimized] (name: main)
asset 346.output.js 69 bytes [emitted] [minimized]
asset 644.output.js 69 bytes [emitted] [minimized]
asset 98.output.js 67 bytes [emitted] [minimized]
Expand All @@ -446,10 +421,10 @@ chunk (runtime: main) 98.output.js 13 bytes [rendered]
[used exports unknown]
context element ./2 ./node_modules/c/ lazy ^\.\/.*$ namespace object ./2
context element ./2.js ./node_modules/c/ lazy ^\.\/.*$ namespace object ./2.js
chunk (runtime: main) output.js (main) 414 bytes (javascript) 6.34 KiB (runtime) [entry] [rendered]
chunk (runtime: main) output.js (main) 403 bytes (javascript) 6.08 KiB (runtime) [entry] [rendered]
> ./example.js main
runtime modules 6.34 KiB 10 modules
dependent modules 171 bytes [dependent] 2 modules
runtime modules 6.08 KiB 9 modules
dependent modules 160 bytes [dependent] 1 module
./example.js 243 bytes [built] [code generated]
[no exports]
[no exports used]
Expand All @@ -466,5 +441,5 @@ chunk (runtime: main) 644.output.js 11 bytes [rendered]
./node_modules/b.js 11 bytes [built] [code generated]
[used exports unknown]
import() b ./example.js 3:0-11
webpack 5.0.0-rc.2 compiled successfully
webpack 5.0.0 compiled successfully
```
Expand Up @@ -408,7 +408,7 @@ chunk 718.output.js 38 bytes [rendered]
[used exports unknown]
context element ./foo ./templates/ lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ namespace object ./foo
context element ./foo.js ./templates/ lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ namespace object ./foo.js
webpack 5.0.0-rc.2 compiled successfully
webpack 5.0.0 compiled successfully
```

## Production mode
Expand Down Expand Up @@ -446,5 +446,5 @@ chunk (runtime: main) 718.output.js 38 bytes [rendered]
[exports: default]
context element ./foo ./templates/ lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ namespace object ./foo
context element ./foo.js ./templates/ lazy ^\.\/.*$ include: \.js$ exclude: \.noimport\.js$ namespace object ./foo.js
webpack 5.0.0-rc.2 compiled successfully
webpack 5.0.0 compiled successfully
```
4 changes: 2 additions & 2 deletions examples/code-splitting-native-import-context/README.md
Expand Up @@ -395,7 +395,7 @@ chunk 718.output.js 38 bytes [rendered]
[used exports unknown]
context element ./foo ./templates/ lazy ^\.\/.*$ namespace object ./foo
context element ./foo.js ./templates/ lazy ^\.\/.*$ namespace object ./foo.js
webpack 5.0.0-rc.2 compiled successfully
webpack 5.0.0 compiled successfully
```

## Production mode
Expand Down Expand Up @@ -433,5 +433,5 @@ chunk (runtime: main) 718.output.js 38 bytes [rendered]
[exports: default]
context element ./foo ./templates/ lazy ^\.\/.*$ namespace object ./foo
context element ./foo.js ./templates/ lazy ^\.\/.*$ namespace object ./foo.js
webpack 5.0.0-rc.2 compiled successfully
webpack 5.0.0 compiled successfully
```
4 changes: 2 additions & 2 deletions examples/code-splitting-specify-chunk-name/README.md
Expand Up @@ -387,7 +387,7 @@ chunk 930.output.js (chunk-foo) 38 bytes [rendered]
[used exports unknown]
import() ./templates/foo ./example.js 1:0-62
cjs require ./templates/foo ./example.js 6:11-37
webpack 5.0.0-rc.2 compiled successfully
webpack 5.0.0 compiled successfully
```

## Production mode
Expand Down Expand Up @@ -425,5 +425,5 @@ chunk (runtime: main) 930.output.js (chunk-foo) 38 bytes [rendered]
[exports: default]
import() ./templates/foo ./example.js 1:0-62
cjs require ./templates/foo ./example.js 6:11-37
webpack 5.0.0-rc.2 compiled successfully
webpack 5.0.0 compiled successfully
```
4 changes: 2 additions & 2 deletions examples/code-splitting/README.md
Expand Up @@ -352,7 +352,7 @@ chunk 796.output.js 22 bytes [rendered]
./node_modules/d.js 11 bytes [built] [code generated]
[used exports unknown]
cjs require d ./example.js 5:12-24
webpack 5.0.0-rc.2 compiled successfully
webpack 5.0.0 compiled successfully
```

## Production mode
Expand All @@ -375,5 +375,5 @@ chunk (runtime: main) 796.output.js 22 bytes [rendered]
./node_modules/d.js 11 bytes [built] [code generated]
[used exports unknown]
cjs require d ./example.js 5:12-24
webpack 5.0.0-rc.2 compiled successfully
webpack 5.0.0 compiled successfully
```
4 changes: 2 additions & 2 deletions examples/coffee-script/README.md
Expand Up @@ -122,7 +122,7 @@ chunk output.js (main) 206 bytes [entry] [rendered]
./example.js 31 bytes [built] [code generated]
[used exports unknown]
entry ./example.js main
webpack 5.0.0-rc.2 compiled successfully
webpack 5.0.0 compiled successfully
```

## Production mode
Expand All @@ -135,5 +135,5 @@ chunk (runtime: main) output.js (main) 206 bytes [entry] [rendered]
./example.js 31 bytes [built] [code generated]
[no exports used]
entry ./example.js main
webpack 5.0.0-rc.2 compiled successfully
webpack 5.0.0 compiled successfully
```

0 comments on commit 5ce65c1

Please sign in to comment.