From 4095831bd1c88a47c7f06b4c85b07e5b1967ad8e Mon Sep 17 00:00:00 2001 From: Marek Suscak Date: Tue, 25 Apr 2017 18:49:44 +0200 Subject: [PATCH 1/3] Document extract-loader. --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index d19bd58f..930c9ea6 100644 --- a/README.md +++ b/README.md @@ -73,6 +73,10 @@ console.log(css); // {String} If there are SourceMaps, they will also be included in the result string. +If, for one reason or another, you need to extract CSS as a +plain string resource (i.e. not wrapped in a JS module) you +might want to check out the [extract-loader](https://github.com/peerigon/extract-loader). It's useful when you, for instance, need to post-process the CSS as a string. +

Options

|Name|Type|Default|Description| From 2e85dfb6dcb32c3e51b4aa0ad254fb0e2cae9739 Mon Sep 17 00:00:00 2001 From: Marek Suscak Date: Wed, 26 Apr 2017 16:05:02 +0200 Subject: [PATCH 2/3] Make the copy consistent. --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 930c9ea6..7f2f336d 100644 --- a/README.md +++ b/README.md @@ -75,7 +75,8 @@ If there are SourceMaps, they will also be included in the result string. If, for one reason or another, you need to extract CSS as a plain string resource (i.e. not wrapped in a JS module) you -might want to check out the [extract-loader](https://github.com/peerigon/extract-loader). It's useful when you, for instance, need to post-process the CSS as a string. +might want to check out the [extract-loader](https://github.com/peerigon/extract-loader). +It's useful when you, for instance, need to post process the CSS as a string.

Options

From 1fc05c30db9c4a34ce6da250e216c97c85de3382 Mon Sep 17 00:00:00 2001 From: Marek Suscak Date: Wed, 26 Apr 2017 16:07:40 +0200 Subject: [PATCH 3/3] Add a usage example. --- README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/README.md b/README.md index 7f2f336d..13604029 100644 --- a/README.md +++ b/README.md @@ -78,6 +78,18 @@ plain string resource (i.e. not wrapped in a JS module) you might want to check out the [extract-loader](https://github.com/peerigon/extract-loader). It's useful when you, for instance, need to post process the CSS as a string. +**webpack.config.js** +```js +{ +   test: /\.css$/, +   use: [ + 'handlebars-loader', // handlebars loader expects raw resource string +     'extract-loader', + 'css-loader' +   ] +} +``` +

Options

|Name|Type|Default|Description|