From 18c89462c47b84d756faf51f10dcf0ce299f1b98 Mon Sep 17 00:00:00 2001 From: Albus Dumbledore Date: Thu, 27 Feb 2020 21:46:28 +0530 Subject: [PATCH 1/8] docs(examples): Improve asset-simple --- examples/asset-simple/template.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/asset-simple/template.md b/examples/asset-simple/template.md index 8e0fb92b3..598823d5f 100644 --- a/examples/asset-simple/template.md +++ b/examples/asset-simple/template.md @@ -1,4 +1,4 @@ -This very simple example shows usage of the asset module type. +This is a very simple example that shows the usage of the asset module type. Files can be imported like other modules without file-loader. From d735090b5a48e6c7daf41e0e479a17288ce98a1f Mon Sep 17 00:00:00 2001 From: Albus Dumbledore Date: Thu, 27 Feb 2020 21:55:27 +0530 Subject: [PATCH 2/8] docs(asset-simple): Improve README.md --- examples/asset-simple/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/asset-simple/README.md b/examples/asset-simple/README.md index 9d1890480..e0ad72080 100644 --- a/examples/asset-simple/README.md +++ b/examples/asset-simple/README.md @@ -1,4 +1,4 @@ -This very simple example shows usage of the asset module type. +This is a very simple example that the shows usage of the asset module type. Files can be imported like other modules without file-loader. From 51d88cd4f9e00e6c276008b01f7c2a199306d3d4 Mon Sep 17 00:00:00 2001 From: Albus Dumbledore Date: Thu, 27 Feb 2020 22:10:46 +0530 Subject: [PATCH 3/8] docs(chunkhash): Improve README.md --- examples/chunkhash/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/chunkhash/README.md b/examples/chunkhash/README.md index 05af0eb77..28813d40a 100644 --- a/examples/chunkhash/README.md +++ b/examples/chunkhash/README.md @@ -1,6 +1,6 @@ -A common challenge with combining `[chunkhash]` and Code Splitting is that the entry chunk includes the webpack runtime and with it the chunkhash mappings. This means it's always updated and the `[chunkhash]` is pretty useless, because this chunk won't be cached. +A common challenge with combining `[chunkhash]` and Code Splitting is that, the entry chunk includes the webpack runtime and with it the chunkhash mappings. This means it's always updated and the `[chunkhash]` is pretty useless because this chunk won't be cached. -A very simple solution to this problem is to create another chunk which contains only the webpack runtime (including chunkhash map). This can be achieved with the `optimization.runtimeChunk` options. To avoid the additional request for another chunk, this pretty small chunk can be inlined into the HTML page. +A very simple solution to this problem is to create another chunk that contains only the webpack runtime (including chunkhash map). This can be achieved with the `optimization.runtimeChunk` options. To avoid the additional request for another chunk, this pretty small chunk can be inlined into the HTML page. The configuration required for this is: From d6aa270350d5832387f27fd6c81a8bfe8b1dcd1c Mon Sep 17 00:00:00 2001 From: Albus Dumbledore Date: Thu, 27 Feb 2020 22:16:33 +0530 Subject: [PATCH 4/8] docs(chunkhash): Improve template.md --- examples/chunkhash/template.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/chunkhash/template.md b/examples/chunkhash/template.md index 99db0f658..91cf1c69b 100644 --- a/examples/chunkhash/template.md +++ b/examples/chunkhash/template.md @@ -1,6 +1,6 @@ -A common challenge with combining `[chunkhash]` and Code Splitting is that the entry chunk includes the webpack runtime and with it the chunkhash mappings. This means it's always updated and the `[chunkhash]` is pretty useless, because this chunk won't be cached. +A common challenge with combining `[chunkhash]` and Code Splitting is that the entry chunk includes the webpack runtime and with it the chunkhash mappings. This means it's always updated and the `[chunkhash]` is pretty useless because this chunk won't be cached. -A very simple solution to this problem is to create another chunk which contains only the webpack runtime (including chunkhash map). This can be achieved with the `optimization.runtimeChunk` options. To avoid the additional request for another chunk, this pretty small chunk can be inlined into the HTML page. +A very simple solution to this problem is to create another chunk that contains only the webpack runtime (including chunkhash map). This can be achieved with `optimization.runtimeChunk` options. To avoid the additional request for another chunk, this pretty small chunk can be inlined into the HTML page. The configuration required for this is: From 41ab6ef948a274e93c1344b09ff88a95fdc1886e Mon Sep 17 00:00:00 2001 From: Albus Dumbledore Date: Thu, 27 Feb 2020 22:28:44 +0530 Subject: [PATCH 5/8] docs(code-splitting-harmony): improve README.md --- examples/code-splitting-harmony/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/code-splitting-harmony/README.md b/examples/code-splitting-harmony/README.md index f43ac50c6..9d9c53932 100644 --- a/examples/code-splitting-harmony/README.md +++ b/examples/code-splitting-harmony/README.md @@ -1,8 +1,8 @@ -This example show how to use Code Splitting with the ES6 module syntax. +This example shows how to use Code Splitting with the ES6 module syntax. The standard `import` is sync. -`import(module: string) -> Promise` can be used to load modules on demand. This acts as split point for webpack and creates a chunk. +`import(module: string) -> Promise` can be used to load modules on demand. This acts as a split point for webpack and creates a chunk. 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". From 749c397e90ab995924cb3f7eab3168fcdd0f9540 Mon Sep 17 00:00:00 2001 From: Albus Dumbledore Date: Thu, 27 Feb 2020 22:31:01 +0530 Subject: [PATCH 6/8] docs(code-splitting-harmony): Improve template.md --- examples/code-splitting-harmony/template.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/code-splitting-harmony/template.md b/examples/code-splitting-harmony/template.md index a38d80576..3f47ddca7 100644 --- a/examples/code-splitting-harmony/template.md +++ b/examples/code-splitting-harmony/template.md @@ -2,7 +2,7 @@ This example show how to use Code Splitting with the ES6 module syntax. The standard `import` is sync. -`import(module: string) -> Promise` can be used to load modules on demand. This acts as split point for webpack and creates a chunk. +`import(module: string) -> Promise` can be used to load modules on demand. This acts as a split point for webpack and creates a chunk. 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". From 0e31f5f21edc821250033f1eebab54c2de4954b5 Mon Sep 17 00:00:00 2001 From: Albus Dumbledore Date: Thu, 27 Feb 2020 22:39:20 +0530 Subject: [PATCH 7/8] docs(code-splitting-native-import-context-filter): Improve README.md --- examples/code-splitting-native-import-context-filter/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/code-splitting-native-import-context-filter/README.md b/examples/code-splitting-native-import-context-filter/README.md index 02abcaf60..9b56bb195 100644 --- a/examples/code-splitting-native-import-context-filter/README.md +++ b/examples/code-splitting-native-import-context-filter/README.md @@ -1,6 +1,6 @@ # example.js -This example illustrates how to filter the ContextModule results of `import()` statements. only `.js` files that don't +This example illustrates how to filter the ContextModule results of `import()` statements. Only `.js` files that don't end in `.noimport.js` within the `templates` folder will be bundled. ```javascript From f58205a757e86ee146df9a7d35bc199d4395c9d2 Mon Sep 17 00:00:00 2001 From: Albus Dumbledore Date: Thu, 27 Feb 2020 22:40:37 +0530 Subject: [PATCH 8/8] docs(code-splitting-native-import-context-filter): Improve template.md --- .../code-splitting-native-import-context-filter/template.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/code-splitting-native-import-context-filter/template.md b/examples/code-splitting-native-import-context-filter/template.md index d4334d580..a4dd169ea 100644 --- a/examples/code-splitting-native-import-context-filter/template.md +++ b/examples/code-splitting-native-import-context-filter/template.md @@ -1,6 +1,6 @@ # example.js -This example illustrates how to filter the ContextModule results of `import()` statements. only `.js` files that don't +This example illustrates how to filter the ContextModule results of `import()` statements. Only `.js` files that don't end in `.noimport.js` within the `templates` folder will be bundled. ```javascript