From fade4217863d592d53cfbe8bbfab6b2a19903a45 Mon Sep 17 00:00:00 2001 From: Fady Samir Sadek Date: Fri, 27 Apr 2018 06:52:51 +0200 Subject: [PATCH 1/5] Added documentation for [contenthash] #6839 --- src/content/configuration/output.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/content/configuration/output.md b/src/content/configuration/output.md index 65a30f94e36a..08a51d27308e 100644 --- a/src/content/configuration/output.md +++ b/src/content/configuration/output.md @@ -10,6 +10,7 @@ contributors: - fvgs - dhurlburtusa - MagicDuck + - fadysamirsadek --- The top-level `output` key contains set of options instructing webpack on how and where it should output your bundles, assets and anything else you bundle or load with webpack. @@ -213,6 +214,11 @@ Using hashes based on each chunks' content: filename: "[chunkhash].bundle.js" ``` +Using hashes generated for extracted content : +```js +filename: "[contenthash].bundle.css" +``` + Make sure to read the [Caching guide](/guides/caching) for details. There are more steps involved than just setting this option. Note this option is called filename but you are still allowed to use something like `"js/[name]/bundle.js"` to create a folder structure. From daed82111e1af7c5dad84511774663484ffac2fc Mon Sep 17 00:00:00 2001 From: Fady Samir Sadek Date: Fri, 27 Apr 2018 21:32:37 +0200 Subject: [PATCH 2/5] Fix TravisCI build --- src/content/configuration/output.md | 1 + 1 file changed, 1 insertion(+) diff --git a/src/content/configuration/output.md b/src/content/configuration/output.md index 08a51d27308e..d1256a1c558d 100644 --- a/src/content/configuration/output.md +++ b/src/content/configuration/output.md @@ -215,6 +215,7 @@ filename: "[chunkhash].bundle.js" ``` Using hashes generated for extracted content : + ```js filename: "[contenthash].bundle.css" ``` From b493cafce687f9e381cb3c2aa707187ed292b076 Mon Sep 17 00:00:00 2001 From: Fady Samir Sadek Date: Mon, 30 Apr 2018 13:02:19 +0200 Subject: [PATCH 3/5] remove extra space before colon --- src/content/configuration/output.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/configuration/output.md b/src/content/configuration/output.md index 0316420ee9e7..13d6edafeb08 100644 --- a/src/content/configuration/output.md +++ b/src/content/configuration/output.md @@ -214,7 +214,7 @@ Using hashes based on each chunks' content: filename: "[chunkhash].bundle.js" ``` -Using hashes generated for extracted content : +Using hashes generated for extracted content: ```js filename: "[contenthash].bundle.css" From 7ae9bcbe131b8db9159b630bb2a00cfaccf60a5e Mon Sep 17 00:00:00 2001 From: Fernando Montoya Date: Sat, 4 Aug 2018 00:56:19 +0200 Subject: [PATCH 4/5] Fix lint issues --- src/content/configuration/output.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/content/configuration/output.md b/src/content/configuration/output.md index 51818148c61d..96389fab7eed 100644 --- a/src/content/configuration/output.md +++ b/src/content/configuration/output.md @@ -268,7 +268,12 @@ module.exports = { Using hashes generated for extracted content: ```js -filename: "[contenthash].bundle.css" +module.exports = { + //... + output: { + filename: '[contenthash].bundle.css'; + } +}; ``` Make sure to read the [Caching guide](/guides/caching) for details. There are more steps involved than just setting this option. From 3651f75b8bf6aff6f50c7567e460599f9243da88 Mon Sep 17 00:00:00 2001 From: Fernando Montoya Date: Sat, 4 Aug 2018 01:08:58 +0200 Subject: [PATCH 5/5] Remove semicolon --- src/content/configuration/output.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/configuration/output.md b/src/content/configuration/output.md index 96389fab7eed..71834e2f5b04 100644 --- a/src/content/configuration/output.md +++ b/src/content/configuration/output.md @@ -271,7 +271,7 @@ Using hashes generated for extracted content: module.exports = { //... output: { - filename: '[contenthash].bundle.css'; + filename: '[contenthash].bundle.css' } }; ```