Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,8 @@ module.exports = ({ env }) => ({

> ℹ️ When using an `{Object}`, the key can be a Node.js module name, a path to a JavaScript file that is relative to the directory of the PostCSS config file, or an absolute path to a JavaScript file.

> ℹ️ `postcss-loader` for webpack marks the `{Object}` form as deprecated, so use the `{Array}` form in JS configs that it loads.

#### `{Array}`

**.postcssrc.js**
Expand Down Expand Up @@ -317,11 +319,11 @@ When using a `{Function}` (`postcss.config.js` or `.postcssrc.js`), it's possibl
module.exports = (ctx) => ({
parser: ctx.parser ? 'sugarss' : false,
map: ctx.env === 'development' ? ctx.map : false,
plugins: {
'postcss-import': {},
'postcss-nested': {},
cssnano: ctx.env === 'production' ? {} : false
}
plugins: [
require('postcss-import')(),
require('postcss-nested')(),
ctx.env === 'production' ? require('cssnano')() : false
]
})
```

Expand Down