@@ -111,15 +111,15 @@ module.exports = {
111
111
112
112
<h2 align =" center " >Options</h2 >
113
113
114
- | Name | Type | Default | Description |
115
- | :------------------------: | :-----------------: | :---------: | :------------------------------------------- |
116
- | [ ` exec ` ] ( #exec ) | ` {Boolean} ` | ` undefined ` | Enable PostCSS Parser support in ` CSS-in-JS ` |
117
- | [ ` parser ` ] ( #syntaxes ) | ` {String\|Object} ` | ` undefined ` | Set PostCSS Parser |
118
- | [ ` syntax ` ] ( #syntaxes ) | ` {String\|Object} ` | ` undefined ` | Set PostCSS Syntax |
119
- | [ ` stringifier ` ] ( #syntaxes ) | ` {String\|Object} ` | ` undefined ` | Set PostCSS Stringifier |
120
- | [ ` config ` ] ( #config ) | ` { Object} ` | ` undefined ` | Set ` postcss.config.js ` config path && ` ctx ` |
121
- | [ ` plugins ` ] ( #plugins ) | ` {Array\|Function} ` | ` [] ` | Set PostCSS Plugins |
122
- | [ ` sourceMap ` ] ( #sourcemap ) | ` {String\|Boolean} ` | ` false ` | Enable Source Maps |
114
+ | Name | Type | Default | Description |
115
+ | :------------------------: | :------------------------- : | :---------: | :------------------------------------------- |
116
+ | [ ` exec ` ] ( #exec ) | ` {Boolean} ` | ` undefined ` | Enable PostCSS Parser support in ` CSS-in-JS ` |
117
+ | [ ` parser ` ] ( #syntaxes ) | ` {String\|Object} ` | ` undefined ` | Set PostCSS Parser |
118
+ | [ ` syntax ` ] ( #syntaxes ) | ` {String\|Object} ` | ` undefined ` | Set PostCSS Syntax |
119
+ | [ ` stringifier ` ] ( #syntaxes ) | ` {String\|Object} ` | ` undefined ` | Set PostCSS Stringifier |
120
+ | [ ` config ` ] ( #config ) | ` {String\| Object\|Boolean} ` | ` undefined ` | Set ` postcss.config.js ` config path && ` ctx ` |
121
+ | [ ` plugins ` ] ( #plugins ) | ` {Array\|Function} ` | ` [] ` | Set PostCSS Plugins |
122
+ | [ ` sourceMap ` ] ( #sourcemap ) | ` {String\|Boolean} ` | ` false ` | Enable Source Maps |
123
123
124
124
### ` Exec `
125
125
@@ -140,12 +140,61 @@ If you use JS styles without the [`postcss-js`][postcss-js] parser, add the `exe
140
140
141
141
### ` Config `
142
142
143
+ Type: ` Boolean|String|Object `
144
+ Default: ` undefined `
145
+
146
+ #### Boolean
147
+
148
+ Enables/Disables autoloading config.
149
+
150
+ ** webpack.config.js**
151
+
152
+ ``` js
153
+ module .exports = {
154
+ module: {
155
+ rules: [
156
+ {
157
+ test: / \. css$ / i ,
158
+ loader: ' postcss-loader' ,
159
+ options: {
160
+ config: false ,
161
+ },
162
+ },
163
+ ],
164
+ },
165
+ };
166
+ ```
167
+
168
+ #### String
169
+
170
+ Allows to specify the absolute path to the config file.
171
+
172
+ ** webpack.config.js**
173
+
174
+ ``` js
175
+ module .exports = {
176
+ module: {
177
+ rules: [
178
+ {
179
+ test: / \. css$ / i ,
180
+ loader: ' postcss-loader' ,
181
+ options: {
182
+ config: path .resolve (__dirname , ' custom.config.js' ),
183
+ },
184
+ },
185
+ ],
186
+ },
187
+ };
188
+ ```
189
+
190
+ #### Object
191
+
143
192
| Name | Type | Default | Description |
144
193
| :-----------------------: | :--------: | :---------: | :----------------------- |
145
194
| [ ` path ` ] ( #path ) | ` {String} ` | ` undefined ` | PostCSS Config Directory |
146
195
| [ ` context ` ] ( #context-ctx ) | ` {Object} ` | ` undefined ` | PostCSS Config Context |
147
196
148
- #### ` Path `
197
+ ##### ` Path `
149
198
150
199
You can manually specify the path to search for your config (` postcss.config.js ` ) with the ` config.path ` option. This is needed if you store your config in a separate e.g ` ./config || ./.config ` folder.
151
200
@@ -169,7 +218,7 @@ You can manually specify the path to search for your config (`postcss.config.js`
169
218
170
219
[ supported config formats ] : https://github.com/michael-ciniawsky/postcss-load-config#usage
171
220
172
- #### ` Context (ctx) `
221
+ ##### ` Context (ctx) `
173
222
174
223
| Name | Type | Default | Description |
175
224
| :-------: | :--------: | :-------------------: | :------------------------------- |
0 commit comments