Skip to content

Commit

Permalink
docs(README): readd ident: postcss to examples (options.ident) (#297
Browse files Browse the repository at this point in the history
)
  • Loading branch information
michael-ciniawsky committed Oct 10, 2017
1 parent 8df20ce commit 813bcbd
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion README.md
Expand Up @@ -28,7 +28,7 @@
<h2 align="center">Install</h2>

```bash
npm i -D postcss-loader
npm i -D postcss-loader
```

<h2 align="center">Usage</h2>
Expand Down Expand Up @@ -201,6 +201,7 @@ module.exports = ({ file, options, env }) => ({
{
loader: 'postcss-loader',
options: {
ident: 'postcss',
plugins: (loader) => [
require('postcss-import')({ root: loader.resourcePath }),
require('postcss-cssnext')(),
Expand All @@ -211,6 +212,8 @@ module.exports = ({ file, options, env }) => ({
}
```

> ⚠️ webpack requires an identifier (`ident`) in `options` when `{Function}/require` is used (Complex Options). The `ident` can be freely named as long as it is unique. It's recommended to name it (`ident: 'postcss'`)
### `Syntaxes`

|Name|Type|Default|Description|
Expand Down Expand Up @@ -312,6 +315,7 @@ within the CSS directly as an annotation comment.
{
loader: 'postcss-loader',
options: {
ident: 'postcss',
plugins: [
require('postcss-import')(),
require('stylelint')(),
Expand Down

0 comments on commit 813bcbd

Please sign in to comment.