Skip to content

Commit 5c1c108

Browse files
y-gagar1nmichael-ciniawsky
authored andcommitted
docs(README): clarify path option description (options.config.path) (#371)
1 parent 4955792 commit 5c1c108

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

README.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ If you use JS styles without the [`postcss-js`][postcss-js] parser, add the `exe
137137

138138
|Name|Type|Default|Description|
139139
|:--:|:--:|:-----:|:----------|
140-
|[`path`](#path)|`{String}`|`undefined`|PostCSS Config Path|
140+
|[`path`](#path)|`{String}`|`undefined`|PostCSS Config Directory|
141141
|[`context`](#context)|`{Object}`|`undefined`|PostCSS Config Context|
142142

143143
#### `Path`
@@ -146,18 +146,23 @@ You can manually specify the path to search for your config (`postcss.config.js`
146146

147147
> ⚠️ Otherwise it is **unnecessary** to set this option and is **not** recommended
148148
149+
> ⚠️ Note that you **can't** use a **filename** other than the [supported config formats] (e.g `.postcssrc.js`, `postcss.config.js`), this option only allows you to manually specify the **directory** where config lookup should **start** from
150+
149151
**webpack.config.js**
150152
```js
151153
{
152154
loader: 'postcss-loader',
153155
options: {
154156
config: {
155-
path: 'path/to/postcss.config.js'
157+
path: 'path/to/.config/'
158+
path: 'path/to/.config/css.config.js'
156159
}
157160
}
158161
}
159162
```
160163

164+
[supported config formats]: https://github.com/michael-ciniawsky/postcss-load-config#usage
165+
161166
#### `Context (ctx)`
162167

163168
|Name|Type|Default|Description|

0 commit comments

Comments
 (0)