Skip to content

Commit 760eefa

Browse files
mareksuscakmichael-ciniawsky
authored andcommitted
docs(README): add extract-loader example (#518)
1 parent b90d8dd commit 760eefa

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

README.md

+17
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,23 @@ console.log(css); // {String}
7373

7474
If there are SourceMaps, they will also be included in the result string.
7575

76+
If, for one reason or another, you need to extract CSS as a
77+
plain string resource (i.e. not wrapped in a JS module) you
78+
might want to check out the [extract-loader](https://github.com/peerigon/extract-loader).
79+
It's useful when you, for instance, need to post process the CSS as a string.
80+
81+
**webpack.config.js**
82+
```js
83+
{
84+
   test: /\.css$/,
85+
   use: [
86+
'handlebars-loader', // handlebars loader expects raw resource string
87+
     'extract-loader',
88+
'css-loader'
89+
   ]
90+
}
91+
```
92+
7693
<h2 align="center">Options</h2>
7794

7895
|Name|Type|Default|Description|

0 commit comments

Comments
 (0)