From 114bee0e789e1d306104cabd4592c6b94570daa7 Mon Sep 17 00:00:00 2001 From: simon Date: Thu, 17 Aug 2017 20:12:39 +0800 Subject: [PATCH 1/9] Updates --- content/loaders/gzip-loader.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/content/loaders/gzip-loader.md b/content/loaders/gzip-loader.md index d4a3a28837cb..c69fab4d9046 100644 --- a/content/loaders/gzip-loader.md +++ b/content/loaders/gzip-loader.md @@ -3,13 +3,13 @@ title: gzip-loader source: https://raw.githubusercontent.com/webpack-contrib/gzip-loader/master/README.md edit: https://github.com/webpack-contrib/gzip-loader/edit/master/README.md --- -## Install +## 安装 ```bash npm install --save-dev gzip-loader ``` -## Usage +## 用法 **webpack.config.js** @@ -33,7 +33,7 @@ module.exports = { require("gzip-loader!./file.js.gz"); ``` -## Maintainers +## 运维人员 @@ -94,4 +94,4 @@ require("gzip-loader!./file.js.gz"); *** -> 原文:https://webpack.js.org/loaders/gzip-loader/ \ No newline at end of file +> 原文:https://webpack.js.org/loaders/gzip-loader/ From 153097db48975f127c415ce301ed490df610e2ca Mon Sep 17 00:00:00 2001 From: simon Date: Mon, 21 Aug 2017 23:16:05 +0800 Subject: [PATCH 2/9] =?UTF-8?q?=E6=9B=B4=E6=AD=A3=E7=BF=BB=E8=AF=91?= =?UTF-8?q?=E8=AF=8D=E6=B1=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- content/loaders/gzip-loader.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/loaders/gzip-loader.md b/content/loaders/gzip-loader.md index c69fab4d9046..a631e30c8dcf 100644 --- a/content/loaders/gzip-loader.md +++ b/content/loaders/gzip-loader.md @@ -33,7 +33,7 @@ module.exports = { require("gzip-loader!./file.js.gz"); ``` -## 运维人员 +## 维护者
From 0a306501293f4aeec1663e087c77f708c45f97c8 Mon Sep 17 00:00:00 2001 From: simon Date: Tue, 22 Aug 2017 08:34:08 +0800 Subject: [PATCH 3/9] update --- content/loaders/gzip-loader.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/loaders/gzip-loader.md b/content/loaders/gzip-loader.md index a631e30c8dcf..712f9e4b84de 100644 --- a/content/loaders/gzip-loader.md +++ b/content/loaders/gzip-loader.md @@ -33,7 +33,7 @@ module.exports = { require("gzip-loader!./file.js.gz"); ``` -## 维护者 +## 维护人员
From 05392211e57927aac80068be1bd91674a85a3a6c Mon Sep 17 00:00:00 2001 From: simon Date: Thu, 24 Aug 2017 21:59:58 +0800 Subject: [PATCH 4/9] =?UTF-8?q?=E5=AE=8C=E6=88=90=E7=BF=BB=E8=AF=91=20aggr?= =?UTF-8?q?essive-splitting-plugin.md=20#322?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../plugins/aggressive-splitting-plugin.md | 20 +++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/content/plugins/aggressive-splitting-plugin.md b/content/plugins/aggressive-splitting-plugin.md index bb31549f924b..9cfcfd958dbd 100644 --- a/content/plugins/aggressive-splitting-plugin.md +++ b/content/plugins/aggressive-splitting-plugin.md @@ -6,29 +6,37 @@ contributors: The `AggressiveSplittingPlugin` can split bundles into smaller chunks, splitting every chunk until it reaches the specified `maxSize` configured in `options`. It groups modules together by folder structure. +`AggressiveSplittingPlugin` 可以将bundles分割到更小的chunks,直到各个chunks的大小为 `option` 设置的 `maxSize` 。 它通过文件结构将模块组织在一起。 + It records the split points in webpack records and tries to restore splitting in the same manner it started. This ensures that after changes to the application, the previous split points (and chunks) are reused as they are probably already in the client's cache. Therefore it's heavily recommended to use records. +它记录了分割点在webpack记录里,并尝试按照它开始的方式还原分割。这确保了在更改应用后,旧的分割点(和chunks)是可再使用的,因为它们可能早已在客户端的缓存中。因此强烈推荐使用记录。 + Only chunks bigger than the specified `minSize` are stored in records. This ensures the chunks fill up as your application grows, instead of creating too many chunks for every change. +仅有在chunks比规定的 `minSize` 大时才会保存在记录里。这保证chunks随着应用的增加而增加,而不是每次改变的时候创建很多的chunks。 + Chunks can be invalidated if a module changes. Modules from invalid chunks will go back into the module pool from which new chunks are created. +如果模块更改,Chunks可能会无效。无效的Chunks模块会回到模块池中,会同时创建一个新的模块。 + ```js new webpack.optimize.AggressiveSplittingPlugin(options) ``` -## Options +## 选项 ```js { - minSize: 30000, //Byte, split point. Default: 30720 - maxSize: 50000, //Byte, maxsize of per file. Default: 51200 - chunkOverhead: 0, //Default: 0 - entryChunkMultiplicator: 1, //Default: 1 + minSize: 30000, //字节, 分割点. 默认: 30720 + maxSize: 50000, //字节, 每个文件最大字节. 默认: 51200 + chunkOverhead: 0, //默认: 0 + entryChunkMultiplicator: 1, //默认: 1 } ``` -## Examples +## 示例 [http2-aggressive-splitting](https://github.com/webpack/webpack/tree/master/examples/http2-aggressive-splitting) From 7f9b317018cc3768b24bfd36c406e3cecf4529a7 Mon Sep 17 00:00:00 2001 From: simon Date: Thu, 24 Aug 2017 22:07:29 +0800 Subject: [PATCH 5/9] =?UTF-8?q?=E5=AE=8C=E6=88=90=E7=BF=BB=E8=AF=91=20aggr?= =?UTF-8?q?essive-splitting-plugin.md=20#322?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- content/plugins/aggressive-splitting-plugin.md | 8 -------- 1 file changed, 8 deletions(-) diff --git a/content/plugins/aggressive-splitting-plugin.md b/content/plugins/aggressive-splitting-plugin.md index 9cfcfd958dbd..908c6716ac8a 100644 --- a/content/plugins/aggressive-splitting-plugin.md +++ b/content/plugins/aggressive-splitting-plugin.md @@ -4,20 +4,12 @@ contributors: - pierreneter --- -The `AggressiveSplittingPlugin` can split bundles into smaller chunks, splitting every chunk until it reaches the specified `maxSize` configured in `options`. It groups modules together by folder structure. - `AggressiveSplittingPlugin` 可以将bundles分割到更小的chunks,直到各个chunks的大小为 `option` 设置的 `maxSize` 。 它通过文件结构将模块组织在一起。 -It records the split points in webpack records and tries to restore splitting in the same manner it started. This ensures that after changes to the application, the previous split points (and chunks) are reused as they are probably already in the client's cache. Therefore it's heavily recommended to use records. - 它记录了分割点在webpack记录里,并尝试按照它开始的方式还原分割。这确保了在更改应用后,旧的分割点(和chunks)是可再使用的,因为它们可能早已在客户端的缓存中。因此强烈推荐使用记录。 -Only chunks bigger than the specified `minSize` are stored in records. This ensures the chunks fill up as your application grows, instead of creating too many chunks for every change. - 仅有在chunks比规定的 `minSize` 大时才会保存在记录里。这保证chunks随着应用的增加而增加,而不是每次改变的时候创建很多的chunks。 -Chunks can be invalidated if a module changes. Modules from invalid chunks will go back into the module pool from which new chunks are created. - 如果模块更改,Chunks可能会无效。无效的Chunks模块会回到模块池中,会同时创建一个新的模块。 ```js From 19a0f3a80e0283d703693b1588e3493794108046 Mon Sep 17 00:00:00 2001 From: simon Date: Wed, 30 Aug 2017 12:22:22 +0800 Subject: [PATCH 6/9] =?UTF-8?q?aggressive-splitting-plugin=20=E6=9B=B4?= =?UTF-8?q?=E6=94=B9=E9=83=A8=E5=88=86=E7=BF=BB=E8=AF=91=E5=86=85=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- content/plugins/aggressive-splitting-plugin.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/content/plugins/aggressive-splitting-plugin.md b/content/plugins/aggressive-splitting-plugin.md index 908c6716ac8a..ac4553fbffa7 100644 --- a/content/plugins/aggressive-splitting-plugin.md +++ b/content/plugins/aggressive-splitting-plugin.md @@ -4,13 +4,13 @@ contributors: - pierreneter --- -`AggressiveSplittingPlugin` 可以将bundles分割到更小的chunks,直到各个chunks的大小为 `option` 设置的 `maxSize` 。 它通过文件结构将模块组织在一起。 +`AggressiveSplittingPlugin` 可以将bundles分割到更小的chunks,直到各个chunks的大小达到 `option` 设置的 `maxSize` 。 它通过文件结构将模块组织在一起。 -它记录了分割点在webpack记录里,并尝试按照它开始的方式还原分割。这确保了在更改应用后,旧的分割点(和chunks)是可再使用的,因为它们可能早已在客户端的缓存中。因此强烈推荐使用记录。 +它记录了分离点在webpack记录里,并尝试按照它开始的方式还原分割。这确保了在更改应用程序后,旧的分割点(和chunks)是可再使用的,因为它们可能早已在客户端的缓存中。因此强烈推荐使用记录。 -仅有在chunks比规定的 `minSize` 大时才会保存在记录里。这保证chunks随着应用的增加而增加,而不是每次改变的时候创建很多的chunks。 +仅有在chunks比规定的 `minSize` 大时才会保存在记录里。这保证chunks随着应用程序的增加而增加,而不是每次改变的时候创建很多的chunks。 -如果模块更改,Chunks可能会无效。无效的Chunks模块会回到模块池中,会同时创建一个新的模块。 +如果模块更改,Chunks可能会无效。无效Chunks中的模块会回到模块池(module pool)中,会同时创建一个新的模块。 ```js new webpack.optimize.AggressiveSplittingPlugin(options) From 4dbe55c4bb1813740b68e3e1a2b2836f158ec800 Mon Sep 17 00:00:00 2001 From: lizhihua <275091674@qq.com> Date: Wed, 30 Aug 2017 15:47:01 +0800 Subject: [PATCH 7/9] Update aggressive-splitting-plugin.md --- content/plugins/aggressive-splitting-plugin.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/content/plugins/aggressive-splitting-plugin.md b/content/plugins/aggressive-splitting-plugin.md index ac4553fbffa7..024cbafe596d 100644 --- a/content/plugins/aggressive-splitting-plugin.md +++ b/content/plugins/aggressive-splitting-plugin.md @@ -4,13 +4,13 @@ contributors: - pierreneter --- -`AggressiveSplittingPlugin` 可以将bundles分割到更小的chunks,直到各个chunks的大小达到 `option` 设置的 `maxSize` 。 它通过文件结构将模块组织在一起。 +`AggressiveSplittingPlugin` 可以将 bundle 分割到更小的 chunk,直到各个 chunk 的大小达到 `option` 设置的 `maxSize`。它通过文件结构将模块组织在一起。 -它记录了分离点在webpack记录里,并尝试按照它开始的方式还原分割。这确保了在更改应用程序后,旧的分割点(和chunks)是可再使用的,因为它们可能早已在客户端的缓存中。因此强烈推荐使用记录。 +它记录了分离点在 webpack 记录里,并尝试按照它开始的方式还原分割。这确保了在更改应用程序后,旧的分离点(和 chunk)是可再使用的,因为它们可能早已在客户端的缓存中。因此强烈推荐使用记录。 -仅有在chunks比规定的 `minSize` 大时才会保存在记录里。这保证chunks随着应用程序的增加而增加,而不是每次改变的时候创建很多的chunks。 +仅有在 chunk 比规定的 `minSize` 大时才会保存在记录里。这保证 chunk 随着应用程序的增加而增加,而不是每次改变的时候创建很多的 chunk。 -如果模块更改,Chunks可能会无效。无效Chunks中的模块会回到模块池(module pool)中,会同时创建一个新的模块。 +如果模块更改,chunk 可能会无效。无效 chunk 中的模块会回到模块池(module pool)中,会同时创建一个新的模块。 ```js new webpack.optimize.AggressiveSplittingPlugin(options) @@ -21,10 +21,10 @@ new webpack.optimize.AggressiveSplittingPlugin(options) ```js { - minSize: 30000, //字节, 分割点. 默认: 30720 - maxSize: 50000, //字节, 每个文件最大字节. 默认: 51200 - chunkOverhead: 0, //默认: 0 - entryChunkMultiplicator: 1, //默认: 1 + minSize: 30000, // 字节,分割点。默认:30720 + maxSize: 50000, // 字节,每个文件最大字节。默认:51200 + chunkOverhead: 0, // 默认:0 + entryChunkMultiplicator: 1, // 默认:1 } ``` From a35f9392a62bde6753b5e6768c669ee607445991 Mon Sep 17 00:00:00 2001 From: lizhihua <275091674@qq.com> Date: Wed, 30 Aug 2017 21:47:48 +0800 Subject: [PATCH 8/9] Update aggressive-splitting-plugin.md --- src/content/plugins/aggressive-splitting-plugin.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/content/plugins/aggressive-splitting-plugin.md b/src/content/plugins/aggressive-splitting-plugin.md index 024cbafe596d..9e7a65410de1 100644 --- a/src/content/plugins/aggressive-splitting-plugin.md +++ b/src/content/plugins/aggressive-splitting-plugin.md @@ -6,9 +6,9 @@ contributors: `AggressiveSplittingPlugin` 可以将 bundle 分割到更小的 chunk,直到各个 chunk 的大小达到 `option` 设置的 `maxSize`。它通过文件结构将模块组织在一起。 -它记录了分离点在 webpack 记录里,并尝试按照它开始的方式还原分割。这确保了在更改应用程序后,旧的分离点(和 chunk)是可再使用的,因为它们可能早已在客户端的缓存中。因此强烈推荐使用记录。 +它记录了在 webpack 记录里的分离点,并尝试按照它开始的方式还原分离。这确保了在更改应用程序后,旧的分离点(和 chunk)是可再使用的,因为它们可能早已在客户端的缓存中。因此强烈推荐使用记录。 -仅有在 chunk 比规定的 `minSize` 大时才会保存在记录里。这保证 chunk 随着应用程序的增加而增加,而不是每次改变的时候创建很多的 chunk。 +仅有在 chunk 超过规定的 `minSize` 时才会保存在记录里。可以确保 chunk 随着应用程序的增加而增加,而不是每次改变的时候创建很多的 chunk。 如果模块更改,chunk 可能会无效。无效 chunk 中的模块会回到模块池(module pool)中,会同时创建一个新的模块。 From ba988c8cc56e3935af5c92e5849bdd8ef5125cc8 Mon Sep 17 00:00:00 2001 From: lizhihua <275091674@qq.com> Date: Wed, 30 Aug 2017 21:48:39 +0800 Subject: [PATCH 9/9] Update aggressive-splitting-plugin.md --- src/content/plugins/aggressive-splitting-plugin.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/plugins/aggressive-splitting-plugin.md b/src/content/plugins/aggressive-splitting-plugin.md index 9e7a65410de1..72cd52050247 100644 --- a/src/content/plugins/aggressive-splitting-plugin.md +++ b/src/content/plugins/aggressive-splitting-plugin.md @@ -4,7 +4,7 @@ contributors: - pierreneter --- -`AggressiveSplittingPlugin` 可以将 bundle 分割到更小的 chunk,直到各个 chunk 的大小达到 `option` 设置的 `maxSize`。它通过文件结构将模块组织在一起。 +`AggressiveSplittingPlugin` 可以将 bundle 拆分成更小的 chunk,直到各个 chunk 的大小达到 `option` 设置的 `maxSize`。它通过目录结构将模块组织在一起。 它记录了在 webpack 记录里的分离点,并尝试按照它开始的方式还原分离。这确保了在更改应用程序后,旧的分离点(和 chunk)是可再使用的,因为它们可能早已在客户端的缓存中。因此强烈推荐使用记录。